Answer:
<u> Initial program output (from original program)</u>
Annual salary is: 40000
Monthly salary is: 3333
<u>Program output after workHoursPerWeek = 35</u>
Annual salary is: 35000
Monthly salary is: 2916
<u>Revised program (using variable workWeeksPerYear)</u>
- public static void main(String[] args) {
-
- int hourlyWage = 20;
- int workHoursPerWeek = 35;
- int workWeeksPerYear = 52;
- int annualSalary = 0;
-
- annualSalary = hourlyWage * workHoursPerWeek * workWeeksPerYear;
- System.out.print("Annual salary is: ");
- System.out.println(annualSalary);
-
- System.out.print("Monthly salary is: ");
- System.out.println((hourlyWage * workHoursPerWeek * workWeeksPerYear) / 12);
-
- return;
-
- }
Program output:
Annual salary is: 36400
Monthly salary is: 3033
<u>Revised Program after introducing monthly salary</u>
- public static void main(String[] args) {
-
- int hourlyWage = 20;
- int workHoursPerWeek = 35;
-
- int workWeeksPerYear = 52;
- int annualSalary = 0;
- int monthlySalary = 0;
-
- annualSalary = hourlyWage * workHoursPerWeek * workWeeksPerYear;
- monthlySalary = hourlyWage * workHoursPerWeek * workWeeksPerYear;
-
- System.out.print("Annual salary is: ");
- System.out.println(annualSalary);
-
- System.out.print("Monthly salary is: ");
- System.out.println((monthlySalary) / 12);
-
- return;
-
- }
Explanation:
One reason to use variable to replace the magic number is to improve the readability of the program. If we compared the revised version of the program with the original program, we will find that the variable enable our code easier to understand.
Besides, if we wish to change the value (e.g. working hours per year or per month), we just need to adjust the value assigned on the variables. The variables provide a single access point to get or change the value.
Answer:
Every physics student learns Newton's three laws of motion. It's tempting to consider that these are three separate and independent laws. That's not so. Both the first and third laws may be mathematically derived from the second law, as we will show.
The fact that the first law may be derived from the second has long been known. The second law,Fnet=ma, tells us that the net (vector sum) of all forces acting on a body is equal to the product of the body's mass and its vector acceleration. When the acceleration is zero, the net force must be zero. This is exactly the content of the first law.
Let's first consider the case of two bodies in contact. Each exerts a force on the other at the interface, or point of contact, where the bodies touch. If that point or interface is treated as a "body" of mass zero, then Newton's second law tells us thatFnet=0a, soFnet= 0. So the net force on a body of zero mass is always zero, whatever forces act upon it. Therefore if only two forces act on a body, they must add to zero, and therefore must be equal size and oppositely directed. This establishes Newton's third law.
Explanation:
Hope this helps
Answer:
The answer is below
Explanation:
Since the type of Implementation is not stated specifically, it is believed that, the question is talking about ERP Implementation, because it is related to subject in which the question is asked.
Hence, Enterprise Resource Planning (ERP) implementation deals basically, by carrying out installation of the software, transferring of finanancial data over to the new system, configuring application users and processes, and training users on the software
ERP Implementation Risks involve the following:
1. Inefficient Management and Project Activities.
2. Inadequate or No Training and Retraining of Customers or End-Users.
3. Inability to Redesign Business Processes to meet the Software requirements.
3. Incompetent or lack of Technical Support Team and Infrastructure.
4. Incapability to Obtain Full-Time Commitment of Employee.
5. Failure to Recruit and Maintained Qualified Systems, and Developers.
D. Mov ax, [bx+si] is your answer
Answer:
Please check the explanation.
Explanation:
Let x=dependents * ((yearsOnJob - 1) * 4) - 6
where dependents=3
Lets supppose year on job 3
then
x=( 3*((3-1)*4)-6
x= 3*8 -6
= 24-6
=18
And similarly, we can calculate the value of arithmetic expression all the time.