Question
A small consulting company ECN.INC have decided to hire you. When you go to the office of the human resources to complete new employees paperwork,
A small consulting company ECN.INC have decided to hire you. When you go to the office of the human resources to complete new employees paperwork, you are presented with two salary offers and told that, before you start working you must decide which offer you want. The two offers are:
Salary 1: Salary of $117.23 per day for 10 days.
Salary 2: Calculated as follows: first day: $1.15, second day: $2.30, third day: $4.60, and so on, with the amount doubling each day up to the 10th day.
After looking at the two offers, you could not tell which offer is better, so you decide to write a program to help you make the best choice. The program you write requires the following:
- A method to hold the inputs, outputs, and pass them when needed
- A method to calculate salary 1 and pass the total to another method called comparison
- A method to calculate salary 2 and pass the total to the same method created in step 2.
- The method mentioned in steps 2 and 3 perform the salary [total] comparisons and pass the best to another method called Names.
- The names method holds your names (last and first names) which will be passed to the display method.
- The method display will then print the result (best salary offer) including your names. For example: John Doe hiring salary is $98.50.
-
Compiled output: should provide the following:
- If salary 1 is higher than salary 2 or vice versa, your output should display salary 1 in amount of $__ formatted in two decimal spaces.
- You must use the necessary relational operators to show the comparison relationship between the two salaries.
- Your compiled output must match your hands-on calculations
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started