12345678 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
12345678 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 CECS 2203, Computer Programming I Lab *Fall 2021, Sec. 07 * Date: August 18, 2021 Topic: Lab 1 * File name: lab01.cpp * This program illustrates the use of a void method. * You must analyze the code, add any missing instructions, correct any errors, and execute the program. * * Execute the program two times, using the values * 21 and 22 as input. Make sure to take a screenshot! Name: YOUR NAME HERE, YOUR ID# HERE */ Bint main() { B - // write the appropriate include statement // write the appropriate using statement // Declare a method named procedure which has no return value 77 and requires no parameters B Void Methods B // Write the statement that declares the integer variable // seguir and initializes it to 1 // build a while iteration structure which uses the variable // seguir as sentinel and repeats the code while the value of // seguir is NOT equal to 0. { // call the procedure method cout < < "Enter 0 to finish, or any other number to continue: "; // Fill in the code to read and store the value in seguir mysql> select from dreamhome. Staff; | staffNo | fName | 1Name | position | Mary | Howe | Assistant | David | Ford | Ann | | John | | SA9 | SG14 | SG37 | SG5 | SL21 | SL41 mysql> mysql> mysql> mysql> 6 rows in set (0.00 sec) mysql> mysql> mysql> mysql> mysql> mysql> mysql> mysql> mysql> mysql> mysql> 4. | Supervisor | Mi | Assistant | F Manager | F | White | Manager | Julie | Lee | Assistant I F | Beech Susan | Brand | sex | salary | 1970-02-19 | 9000.00 | B007 | 1958-03-24 | 18000.00 | B003 | 1960-11-10 | 12000.00 | B003 | 1940-06-03 | 24000.00 | B003 | 1945-10-01 | 30000.00 | B005 | 1965-06-13 | 9000.00 | B005 | DOB | branchNo | (15 pts) Create a view vHW2_4_xxxx showing the age and monthly_salary for each staff in dreamhome.Staff table. You need to use timestampdiff function to calculate the age. Your view should have 3 columns and the column names should be (name, age, monthly_salary). The "name" should be first name and last name (in order), and there is a space between first name and last name. The monthly_salary should be formatted with 1 decimal place. The output should be sorted by the age from high to low. V 12345678 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 CECS 2203, Computer Programming I Lab *Fall 2021, Sec. 07 * Date: August 18, 2021 Topic: Lab 1 * File name: lab01.cpp * This program illustrates the use of a void method. * You must analyze the code, add any missing instructions, correct any errors, and execute the program. * * Execute the program two times, using the values * 21 and 22 as input. Make sure to take a screenshot! Name: YOUR NAME HERE, YOUR ID# HERE */ Bint main() { B - // write the appropriate include statement // write the appropriate using statement // Declare a method named procedure which has no return value 77 and requires no parameters B Void Methods B // Write the statement that declares the integer variable // seguir and initializes it to 1 // build a while iteration structure which uses the variable // seguir as sentinel and repeats the code while the value of // seguir is NOT equal to 0. { // call the procedure method cout < < "Enter 0 to finish, or any other number to continue: "; // Fill in the code to read and store the value in seguir 12345678 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 CECS 2203, Computer Programming I Lab *Fall 2021, Sec. 07 * Date: August 18, 2021 Topic: Lab 1 * File name: lab01.cpp * This program illustrates the use of a void method. * You must analyze the code, add any missing instructions, correct any errors, and execute the program. * * Execute the program two times, using the values * 21 and 22 as input. Make sure to take a screenshot! Name: YOUR NAME HERE, YOUR ID# HERE */ Bint main() { B - // write the appropriate include statement // write the appropriate using statement // Declare a method named procedure which has no return value 77 and requires no parameters B Void Methods B // Write the statement that declares the integer variable // seguir and initializes it to 1 // build a while iteration structure which uses the variable // seguir as sentinel and repeats the code while the value of // seguir is NOT equal to 0. { // call the procedure method cout < < "Enter 0 to finish, or any other number to continue: "; // Fill in the code to read and store the value in seguir mysql> select from dreamhome. Staff; | staffNo | fName | 1Name | position | Mary | Howe | Assistant | David | Ford | Ann | | John | | SA9 | SG14 | SG37 | SG5 | SL21 | SL41 mysql> mysql> mysql> mysql> 6 rows in set (0.00 sec) mysql> mysql> mysql> mysql> mysql> mysql> mysql> mysql> mysql> mysql> mysql> 4. | Supervisor | Mi | Assistant | F Manager | F | White | Manager | Julie | Lee | Assistant I F | Beech Susan | Brand | sex | salary | 1970-02-19 | 9000.00 | B007 | 1958-03-24 | 18000.00 | B003 | 1960-11-10 | 12000.00 | B003 | 1940-06-03 | 24000.00 | B003 | 1945-10-01 | 30000.00 | B005 | 1965-06-13 | 9000.00 | B005 | DOB | branchNo | (15 pts) Create a view vHW2_4_xxxx showing the age and monthly_salary for each staff in dreamhome.Staff table. You need to use timestampdiff function to calculate the age. Your view should have 3 columns and the column names should be (name, age, monthly_salary). The "name" should be first name and last name (in order), and there is a space between first name and last name. The monthly_salary should be formatted with 1 decimal place. The output should be sorted by the age from high to low. V mysql> select from dreamhome. Staff; | staffNo | fName | 1Name | position | Mary | Howe | Assistant | David | Ford | Ann | | John | | SA9 | SG14 | SG37 | SG5 | SL21 | SL41 mysql> mysql> mysql> mysql> 6 rows in set (0.00 sec) mysql> mysql> mysql> mysql> mysql> mysql> mysql> mysql> mysql> mysql> mysql> 4. | Supervisor | Mi | Assistant | F Manager | F | White | Manager | Julie | Lee | Assistant I F | Beech Susan | Brand | sex | salary | 1970-02-19 | 9000.00 | B007 | 1958-03-24 | 18000.00 | B003 | 1960-11-10 | 12000.00 | B003 | 1940-06-03 | 24000.00 | B003 | 1945-10-01 | 30000.00 | B005 | 1965-06-13 | 9000.00 | B005 | DOB | branchNo | (15 pts) Create a view vHW2_4_xxxx showing the age and monthly_salary for each staff in dreamhome.Staff table. You need to use timestampdiff function to calculate the age. Your view should have 3 columns and the column names should be (name, age, monthly_salary). The "name" should be first name and last name (in order), and there is a space between first name and last name. The monthly_salary should be formatted with 1 decimal place. The output should be sorted by the age from high to low. V
Expert Answer:
Related Book For
Computer Systems A Programmers Perspective
ISBN: 9781292101767
3rd Global Edition
Authors: Randal E. Bryant, David R. O'Hallaron
Posted Date:
Students also viewed these programming questions
-
During FY 2017, the voters of Surprise County approved construction of a $21 million police facility and an $11 million fire station to accommodate the county's population growth. The construction...
-
Suppose the following data describe a nation's population: (a) What is the unemployment rate in each year? (b) Has the economy experienced an increase or a decrease in i. The number of unemployed...
-
List the following numbers in numerical order, starting with the smallest: 1, 9, , 5, |8| , |3|, 3.1.
-
What are the different types of consulting and litigation support activities for fraud and forensic accounting professionals?
-
A condensed income statement for the Commercial Division of Maxell Manufacturing Inc. for the year ended December 31, 2014, is as follows: Sales ..............$ 3,500,000 Cost of goods sold ............
-
Oil having a density of 921 kg/m floats on water. A rectangular block of wood 4.41 cm high and with a density of 963 kg/m floats partly in the oil and partly in the water. The oil completely covers...
-
Franklin Manufacturing manufactures two models of windows, bay windows and casement windows. Franklin uses an activity based costing system. The following information about the activities used to...
-
-The relationship between the distribution and excretion of toxic affects: a) excretion b) Absorption c) Bioaccumulation -Oral absorption is related to. Choose the best option. a) Enzymatic, chemical...
-
This assessment addresses the following course objective(s): Evaluate strategies for managing project scope, time, cost, and quality. Create project deliverables. Instructions Arrange a...
-
The State of New Jersey argued that teachers and school administrators acted like parents in their dealings with students and for that reason searches conducted by school officials should not be...
-
You have just completed your corporate risk review and have identified a risk which is not fully diversifiable. Taking into account process and procedural mitigation efforts; you note you still...
-
Match the term in the left hand column with the most related term in the right hand column: A B BETA C Straddle D Lock-in raw materials price E Distress financial costs EF F G Column A H | J Long...
-
1 2 3 4 A H H B H H H ATRIUM D H E H 8 H F H You are provided a concept layout for a building's typical floor plan by an Architect, as shown above. The architect has proposed a concrete service core...
-
Find the surface area of the object obtained by rotating x = e2y, 1 < y <1 about the y axis.
-
Explain the buyers position in a typical negotiation for a business. Explain the sellers position. What tips would you offer a buyer about to begin negotiating the purchase of a business?
-
Assume the two register writes in the write-back stage for popq occur in the order listed in Figure 4.20.What would be the effect of executing popq %rsp? Does this conform to the desired behavior for...
-
Consider the following C function, where EXPR is a macro defined with #define: Below, we show the AVX2 code generated for different definitions of EXPR, where value x is held in %xmm0. All of them...
-
Assuming w = 4, we can assign a numeric value to each possible hexadecimal digit, assuming either an unsigned or a two's-complement interpretation. Fill in the following table according to these...
-
Preventing a user who approves a configuration change from being the person who implements the change is an example of which of the following? A. Rotation of duties B. Least privilege C. Segregation...
-
A onedimensional heat conduction problem can be expressed by the following differential equation: where \(k\) is the thermal conductivity, \(T(x)\) is the temperature, and \(Q\) is heat generated per...
-
Consider a simply supported beam of length \(L\) subjected to a uniformly distributed transverse load \(p(x)=p_{0}\). Use the Rayleigh-Ritz method to determine the transverse deflection \(v(x)\) of...
Study smarter with the SolutionInn App