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.
Of the given choices, the option that establishes a conceptual framework for network connectivity is OSI model.
<h3>What is network connectivity?</h3>
Network connectivity is a term that tells more about the process of connecting different areas of a network to each other.
Conclusively, the OSI Model often called Open Systems Interconnection Model is known to be the conceptual framework that tells the functions or duties of a networking system.
Learn more about network connectivity from
brainly.com/question/26956118
1. <u>Comments</u> notes that can be attached to cells to add additional information that is not printed on the worksheet network drive.
2. <u>Footer</u> text and/or graphics that print at the bottom of each page headers.
3. <u>Headers</u> text and/or graphics that print at the top of each page rows.
4. <u>Margins</u> the white space left around the edges of the paper when a worksheet is printed comments.
5. <u>Network drive</u> location at a workplace for storing computer files footer.
6. <u>Rows</u> go across (horizontal) margins.
7. <u>Template</u> a file format used to create new files that contain the same data as the template.
<u>Explanation:</u>
On the off chance that you need to add a header or footer to all sheets, select each sheet by right-clicking one of the sheet tabs at the base of the Excel screen and clicking "Select All Sheets" in the spring up menu. It's genuinely basic to put an Excel header on all pages of all worksheets in your record.
A header is a line of content that shows up at the highest point of each page of a printed worksheet. You can change the direction of a worksheet, which is the situation of the substance with the goal that it prints either vertically or on a level plane on a page.