java red black tree

 

Trace the operation of a Red-Black Tree given the following operations:
insert(49)
insert(85)
insert(51)
insert(90)
insert(28)
insert(37)
insert(61)
insert(10)
insert(32)
insert(40)
insert(59)
insert(19)
insert(63)
insert(26)
insert(55)
Next, Delete the following items sequentially.
delete(49)
delete(59)
delete(51)
delete(19)
delete(26)
delete(10)
Starting with an empty tree, perform the following insertion operations:

2
insert(14)
insert(95)
insert(71)
insert(36)
insert(25)
insert(88)
insert(27)
insert(33)
insert(79)
insert(81)
insert(63)
insert(26)
insert(30)
insert(44)
insert(62)
And then do the following deletions:
delete(88)
delete(30)
delete(27)
delete(79)
delete(62)
delete(44)
2 Deliverables
(a) Implement the above using Java
(b) Your paper work sheets showing work sufficient to show what you were d

use a digital camera, or even

  

 use a digital camera, or even your cell phone, to take at least five (5) digital photographs. Download the photos to your computer, and use an EXIF Viewer tool (such as the one that can be downloaded for free here: http://download.cnet.com/Exif-Viewer/3000-12511_4-10686903.html; or the online version found here: http://www.exifviewer.org/) to examine the EXIF data for each picture. Compare the results shown to you by EXIF Viewer with the EXIF data reported by your operating system (e.g., Windows 7, OS X, etc.; right-click each photo and view the properties – may need to choose the “Details” tab). Are there any differences? Which method provided more information? Paste the photos into a Word document followed by a list of each photo’s EXIF data, and explain to your instructor how this EXIF data contained within a digital photograph could be used in an investigation of child pornography. Provide THOROUGH discussion

Java coding problem (Boolean algebra and truth tables)

Write a program to generate a truth table for a given Boolean statement. For example, A + B * C produces the following table:

A B C | B * C | A + B * C

===============================

0 0 0 | 0 | 0

0 0 1 | 0 | 0

0 1 0 | 0 | 0

0 1 1 | 1 | 1

1 0 0 | 0 | 1

1 0 1 | 0 | 1

1 1 0 | 0 | 1

1 1 1 | 1 | 1

Input from the keyboard a string representing a Boolean expression where the operators are the following: ! (NOT), * (AND), + (OR), ^ (XOR). Single sets of parentheses can be used if needed. Covert all letters to uppercase and have one space between each operator. The truth table must be able to handle up to four variables and be in binary order. For example, in the first test case, if the Boolean values of A, B, and C were replaced with 1’s for true and 0’s for false, the Boolean combination with the smallest binary representation would come first.

Output to the screen a truth table for the given Boolean expression. The first column of the truth table should represent A, the second B, the third C, and so on. Each binary operation must have its own column and all columns must be labeled. The entries in each column should be aligned and formatted with capital letters like the examples below. Except for the final column, columns do not have to be in any order except the order of operations must be followed to get the correct final answer. Finally, the program should ask if the user wants to run the program again (Check case). Refer to the sample output below.

Sample Run:

Enter the Boolean expression: A + B * C

A B C | B * C | A + B * C

===============================

0 0 0 | 0 | 0

0 0 1 | 0 | 0

0 1 0 | 0 | 0

0 1 1 | 1 | 1

1 0 0 | 0 | 1

1 0 1 | 0 | 1

1 1 0 | 0 | 1

1 1 1 | 1 | 1

Run again (Y/N)? y

Enter the Boolean expression: (!A * B) ^ (B + C)

A B C | !A * B | B + C | (!A * B) ^ (B + C)

=================================================

0 0 0 | 0 | 0 | 0

0 0 1 | 0 | 1 | 1

0 1 0 | 1 | 1 | 0

0 1 1 | 1 | 1 | 0

1 0 0 | 0 | 0 | 0

1 0 1 | 0 | 1 | 1

1 1 0 | 0 | 1 | 1

1 1 1 | 0 | 1 | 1

Run again (Y/N)? N

3/1 Assignment

Getting Started: 

The Bible provides a wealth of insight into our lives. God’s Word provides principles that can shape our worldview toward beneficial behavior. However, the Bible also characterizes mankind as born with a sinful nature. We are told in Romans 8:7 “The sinful mind is hostile to God. It does not submit to God’s law, nor can it do so” (New International Version). Due to mankind’s desire to seek selfish ends in all of life, we tend not to do what is right but only what is in our best interest, or so we think. However, God has a plan. Proverbs 19:21 says, “Many are the plans in a man’s heart, but it is the Lord’s purpose that prevails.” Although the sinful nature of humankind is inherent, God has an eternal design. We, too, need a plan in our oversight of information technology use. God’s Word also reminds us that the goal is to treat our fellow members of society with the same respect we want to enjoy. Matthew 7:12 is commonly referred to as the Golden Rule. Jesus said, “So in everything, do to others what you would have them do to you. For this sums up the Law and the Prophets.”

Instructions: 

  1. Review the material in the “Getting Started” section above, and read Romans 8:7, Proverbs 19:21, and Matthew 7:12.
  2. Be sure to address the following prompts in your paper:
    1. In what areas of your professional life could the Golden Rule, Matthew 7:12, apply?
    2. How should this rule be used in developing a governance plan in technology?
  3. Your paper should be at least 250 words in length.

Write a program that prompts

  

Write a program that prompts the user to input a string and outputs

the string in uppercase letters. (Use a character array to store the string) Use only dynamic arrays 

Need help in Homework

 Penetration testing is a simulated cyberattack against a computer or network that checks for exploitable vulnerabilities. Pen tests can involve attempting to breach application systems, APIs, servers, inputs, and code injection attacks to reveal vulnerabilities. In a well-written, highly-detailed research paper, discuss the following:

  • What is penetration testing
  • Testing Stages
  • Testing Methods
  • Testing, web applications and firewalls

Exp22_Excel_Ch07_HOE_Salaries

  

Exp22_Excel_Ch07_HOE_Salaries

Project Description:

You are an assistant accountant in the Human Resources (HR) Department for Home Protection, Inc., a company that sells smart home security systems to residential customers. Home Protection, Inc., with locations in Atlanta, Boston, Chicago, and Cleveland, has a manager at each location who oversees several account representatives. You have an Excel workbook that contains names, locations, titles, hire dates, and salaries for the 16 account representatives and 4 managers. To prepare for your upcoming salary analyses, you downloaded salary data from the corporate database into the workbook. The HR director wants you to perform several tasks based on locations and job titles. You will use date functions to identify the year each employee was hired and how many years they have worked for the company. In addition, you will use logical functions to calculate annual bonus amounts. Next, you will insert math and statistical functions and a map to help analyze the data. Finally, you will review the financial aspects of automobiles purchased for each manager.

Steps to Perform:

   

Step

Instructions

Points    Possible

 

1

Start   Excel. Download and open the file named Exp22_Excel_Ch07_HOE_Salary.xlsx.   Grader has automatically added your last name to the beginning of the   filename.

0

 

2

Your first task is to extract the year hired from   the hire date for each employee.
 

  In cell F7 of the 1-Date Logic worksheet, insert the YEAR function to   identify the year from the date stored in cell E7. Use the fill handle to   copy the function from cell F7 to the range F8:23 using the Fill Without   Formatting option.

5

 

3

Your   next task is to calculate how long each manager and representative has worked   for the company.
 

  In cell G7, insert the YEARFRAC function using the Hire Date and Last Day of   the Year. Use relative and mixed references correctly. Use the fill handle to   copy the function in cell G7 to the range G8:G23 using the Fill Without   Formatting option.

5

 

4

You want to identify which day of the week each   employee was hired. To do this, you will insert a WEEKDAY function to return   an integer representing the weekday.
 

  In cell H7, insert the WEEKDAY function using the Hire Date. Copy the   function from cell H7 and paste to the range H8:H23 using the No Borders   paste option. 

5

 

5

You   will use a custom number format to display the result as a weekday instead of   an integer.
 

  Select the range H7:H23, apply the custom number format dddd, and apply left horizontal alignment.

3

 

6

Column B contains the city location for each   account rep and manager. However, you also want to display the regions.   Atlanta is in the South, Boston is in the Northeast, and Chicago and   Cleveland are both in the Midwest. You will use the SWITCH function to   identify which region each city is in.
 

  In cell C7, insert the SWITCH function to identify the city in cell B7.   Switch Atlanta   for South (cell   C2), switch Boston for Northeast (cell C4), switch Chicago for Midwest (cell C3), switch Cleveland for Midwest (cell C3). Insert   city names as text strings, and use mixed references to the cells containing   the regions. Copy the function from cell C7 and paste to the range C8:C23   using the paste Formulas option.

5

 

7

Your   next task is to calculate the annual bonus amount for each employee. The   company uses a tiered bonus system that awards a specific percentage of   salary based on hire date.
 

  In cell J7, insert the IFS function to test if the Hire Date is before   1/1/2013. If so, the bonus is 8% of the salary. If the Hire Date is before   1/1/2018, the bonus is 4% of the salary. If the Hire Date is before 1/1/2023,   the bonus is 2% of the salary. If none of the conditions are met, the bonus   is 0. Use mixed references to the   dates in the range J2:J4 and bonus percentages in the range K2:K4. Copy the   function from cell J7 and paste it in the range J8:J23 using the paste   Formulas option.

5

 

8

The HR director recommends that the company pay   managers at least $80,000.
 

  In cell K7, insert an AND function that evaluates if the the Title is Manager and if the Salary is less than   $98,000. Insert the title as a text string and use a mixed reference to the   $98,000 in cell G3. Nest the AND function as the logical test within an IF   function. If the results of the AND function are true, display the text Due for a   raise. If the   results are false, display the text N/A. Use the fill handle to copy the function to the   range K8:K23 using the Fill Without Formatting option.

5

 

9

You   want to calculate the number of employees in each state. You set up a   worksheet with a summary section to calculate statistics by states, indicated   by the state abbreviations.
 

  Display the 2-Stats Map worksheet. In cell J3, insert the COUNTIF function to   count the number of state abbreviations in the State column that match the   state abbreviation in cell I3. Use mixed references to the range and relative   reference to the criteria state abbreviation. Copy the function from cell J3   to the range J4:J6.

5

 

10

Next, you want to calculate the total payroll by   summing employee salaries in each state.
 

  In cell K3, insert the SUMIF function to total the Salary column if the State   column meets the state abbreviation criteria in cell I3. Use mixed and   relative references correctly. Copy the function from cell K3 to the range   K4:K6. 

5

 

11

You now   want to focus on average salaries by job title. You will calculate the   average account rep salary and the average manager salary.
 

  In cell J9, insert the AVERAGEIF function to calculate the average salary if   the Title column meets the title criteria in cell H9. Use mixed and relative   references correctly. Copy the function from cell J9 to cell J10.

5

 

12

Now you want to focus on the summarizing data for   Account Reps hired before 1/1/2018. Specifically, you want to calculate the   total number of Account Reps.
 

  In cell J13, insert the COUNTIFS function to calculate the number of Account   Reps (cell H9) in the Title column where the date in the Hire Date column was   before 1/1/2018. Use relative references for   the two criteria range arguments and the title criteria argument in cell H9.   Type the date comparison for the second criteria argument.

5

 

13

The   next step is to calculate the total salary for Account Reps hired before   1/1/2018. You will use mixed references so that you can later copy the   function and change the function name for other calculations.
 

  In cell J14, insert the SUMIFS function to calculate the total amount in the   Salary column where the Title contains the job title criteria Account Rep   (cell H9) and where the date in the Hire Date column was before 1/1/2018. Use relative references for   the sum_range argument, the two criteria range arguments, and the title   criteria in cell H9. Type the date comparison for the second criteria   argument.

5

 

14

Copy the function from cell J14 to cell J15. In   cell J15, change the function name to AVERAGEIFS. If the original function was   created correctly with mixed and relative cell references, the modified   function should calculate the average salary for Account Reps hired before   1/1/2018.

3

 

15

Copy   the function from cell J15 to cell J16. In cell J16, change the function name   to MAXIFS. If the original function was   created correctly with mixed and relative cell references, the modified function   should calculate the highest salary for Account Reps hired before 1/1/2018.

3

 

16

Copy the function from cell J16 to cell J17. In   cell J17, change the function name to MINIFS. If the original function was created correctly   with mixed and relative cell references, the modified function should   calculate the lowest salary for Account Reps hired before 1/1/2018.

3

 

17

You   want to insert a map to indicate the total payroll by state.
 

  Select the ranges I2:I6 and K2:K6 and insert a filled map. Cut the map and   paste it in cell M1.

5

 

18

Change the map title to Payroll by State.

1

 

19

You   want to customize the map.
 

  Display the Format Data Series task pane and display map labels in the Best   fit only position. Apply the Diverging (3-color) series color. Change the   minimum lowest value fill color to Orange. Change the maximum highest value   fill color to Dark Red. Close the task pane.

2

 

20

The location managers want new company cars. The   chief financial officer has determined that the company can afford $600   monthly payments based on a 5.25% APR for three-year loans. Your first step   is to calculate the loan.
 

  Display the 3-Finance worksheet. In cell E2, insert the PV function using the   periodic rate, the number of payment periods, and a negative value for the   monthly payment.

3

 

21

Next,   you want to enter formulas that will calculate the beginning balance.
 

  In cell B8, enter a reference to cell E2. In cell B9, enter a reference to   cell F8. Copy the formula from cell B9 to the range B10:B43. (The results   will be correct after all other formulas and columns are completed.)

2

 

22

In cell C8, enter a mixed reference to B2. Copy the   formula to the range C9:C43. The results should be 600 for all formula   results.

2

 

23

The   next column is designed to calculate the interest amount per payment.
 

  In cell D8, insert the IPMT function using the periodic rate, the current   payment number in the first column, the number of payments, and loan. Use   relative and mixed references correctly. Make sure the result is a positive   value. Copy the function to the range D9:D43.

3

 

24

Column E is to display the portion of the payment   that goes toward paying down the principal.
 

  In cell E8, insert the PPMT function using the same arguments that you used   for the IMPT function. Copy the function to the range E9:E43.

3

 

25

You are   now ready to calculate the ending balance after each payment. After you   complete this step, the amortization table should display complete results.
 

  In cell F8, enter a formula that subtracts the principal payment from the   beginning balance. Copy the formula to the range F9:F43.

2

 

26

You are ready to format the amortization table.
 

  Format the range B8:F8 with Accounting Number Format. Format the range B9:F43   with Comma Style.

2

 

27

Format   the range C44:E44 with the Total cell style.

1

 

28

You decide to include a column to show the   cumulative interest after each payment.
 

  In cell H8, insert the CUMIPMT function using the periodic rate, number of payments, loan, first payment   number as start period, first payment number as end period, and 0 as the Type   argument. Use mixed references for all cell references except the end_period   argument, which should be a relative reference. Edit the function to display   a positive result. Copy the function to the range H9:H43.

4

 

29

Finally,   you want to calculate cumulative principal after each payment.
 

  In cell I8, insert the CUMPRINC function using the same arguments that you   used for the CUMIPMT function. Copy the function to the range I9:I43.

3

 

30

Save and close Exp22_Excel_Ch07_HOE_Salary.xlsx.   Exit Excel. Submit the file as directed.

0

  

Total   Points

100

dq

 The latest generation of mobile devices are portable enough to carry at all times, connected to voice and data networks, and contextually aware by using sensors and networks to preemptively complete tasks.  Many of today’s mobile applications are personalized, and are not useful if they can only access the data on the phone.  For a user to get, for example, sports scores, retrieve stock quotes, or perform accounting work, the mobile device needs to communicate with one or more servers, starting with the Window servers.

  1. Discuss effective use of screen real estate
  2. How does mobile user interface designs & websites reduce end-user self-efficacy?
  3. What are the challenges of integrating mobile applications with multiple databases?