Answer:
False
Explanation:
vector is like a dynamic array that has a special ability to resize automatically when it required.
vector has several functions:
like, insert() to insert the element in the vector.
delete() for delete the one element at a time.
empty() is also the function used in the vector. It is used for checking the vector is empty or not.
it gives the Boolean value (TRUE or FALSE), if the vector is empty it gives the output TRUE if the vector is not empty it gives the output FALSE.
It is not used for empty or deletes all elements of the vector.
Therefore, the answer is False.
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.
Microsoft certification is a series of programs that provide certification of competence in Microsoft products.
Answer:
Image tag or <img> tag
Explanation:
HTML refers to Hypertext Markup language. In this, we can be designed our documents by applying the font, color, image i.e to presented in the web browser. It is used for creating the webpages
Since in the question, Ted has approx 20 pictures for the post having caption and wants to display the picture so he needs to use the image tag or <img> for displaying the pictures. This tag is used for linking the images for the web pages you have created