Question: C++ please Question 31 (10 points) The structure Car is declared as follows: struct Car { string carMake; string carModel; int yearModel: double cost; );

C++ please
C++ please Question 31 (10 points) The structure Car is declared as
follows: struct Car \{ string carMake; string carModel; int yearModel: double cost;
); Write the statement that will define a Car structure variable called
FordModels and initialized it with the following data in ONE line of
code: Make: Ford Model: Mustang Year Model: 1968 Cost: $20,000 Define an
array of 5 elements of the Car structure called USCars. Insert in
to the USCars array the following data: Question 34 (10 points) Code

Question 31 (10 points) The structure Car is declared as follows: struct Car \{ string carMake; string carModel; int yearModel: double cost; ); Write the statement that will define a Car structure variable called FordModels and initialized it with the following data in ONE line of code: Make: Ford Model: Mustang Year Model: 1968 Cost: $20,000 Define an array of 5 elements of the Car structure called USCars. Insert in to the USCars array the following data: Question 34 (10 points) Code the statements that will create a class called Student. The class will have 2 member functions: FullName - It is a string that will hold a students full name like "Tom Hays" Age - It is an integer that will hold the students current age like 35. Create the private variables in the class and the Accesssor and Mutator member functions (the get and set) for both of these private variables. Write a loop that will step through the array you defined in the previous question, displaying the contents of each element. Using the Student class you just defined in the previous question code the statement that will instantiate the class. The variable name should be MyStu. Question 36 (10 points) Using the MyStu object you just defined in the previous question code the statement that will store the following values: Student full name: Tom Hays Student age: 35 Question 37 (10 points) Using the MyStu object you just used in the previous question code the statement that will display to the screen the following information from the Student class. The output should look like this: The students name is: Tom Hays The students age is: 35

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!