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.
I believe that the answer to the question provided above is that with the age of improving technology, the aspects of future games will be based more unto electronic games or e-games.
Hope my answer would be a great help for you. If you have more questions feel free to ask here at Brainly.
C. Provides an interface between user and OS.
The GUI, or Graphical User Interface, is just about everything you generally see with a common computer or smartphone. You rarely run an application or program from the command itself, as clicking an icon in the GUI runs the software for you.
Answer:
A good administrative position to acquire as a stepping stone to future positions is an intern.
Explanation:
When an individual is an intern within an administrative sector, he will be able to learn many concepts and guidelines of this type of work, getting involved in various areas within the sector and accumulating knowledge that will serve him to occupy greater positions within the sector.
In this case, being a trainee is a better option due to the exchange of areas in which he can participate and which will show where his greatest capacities are concentrated within an administrative sector.
Answer:
The second option.
Explanation:
Edge computing sits at the center of the network while Cloud sits at the periphery.