Please help, this question was rejected for complexity but I really don't have any one else to ask! I would really like to see what I got wrong so if anyone can solve this please help! Write a complete C++ program with the following: A struct named Car with member variables to store car make, model, and price. A function named setCar that returns a Car and has no parameters. setCar will: prompt the user for a car name, model, and price, and return that car. A void function named showCars with 2 parameters: a constant Car array named cars, and a constant integer named SIZE. The showCars function will: Use a loop to display the make, model, and price of each car in the cars array, and will also display what that car’s position is in the array (for regular computer users who start counting from 1, not programmers who start counting from 0).  In the main function Declare a constant integer named SIZE with the value of 3. Declare a Car array the size of SIZE. Write a loop to call your setCar function, and populate each car in your array. Your loop will also identify which car your are getting details for Call your showCars function, to display all of the cars in your array. Declare an integer array named nbrs the size of SIZE with the values: 200, 300, and 100. Write a loop that: Displays each number. ALSO in your loop, find out which number is the largest number. After the loop, display your variable with the largest number. Declare 2 constant integers: ROW with a value of 2, and COL with a value of 5. Declare a 2-dimensional array named pets the size of ROW and COL. Populate it with 5 cats and 5 dogs. Write a nested loop to display all cats and dogs

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

C++ HELP!

Please help, this question was rejected for complexity but I really don't have any one else to ask! I would really like to see what I got wrong so if anyone can solve this please help!

Write a complete C++ program with the following:

A struct named Car with member variables to store car make, model, and price.

A function named setCar that returns a Car and has no parameters. setCar will:
prompt the user for a car name, model, and price, and return that car.

A void function named showCars with 2 parameters: a constant Car array named cars, and a constant integer named SIZE. The showCars function will:
Use a loop to display the make, model, and price of each car in the cars array, and will also display what that car’s position is in the array (for regular computer users who start counting from 1, not programmers who start counting from 0). 

In the main function
Declare a constant integer named SIZE with the value of 3.
Declare a Car array the size of SIZE.

Write a loop to call your setCar function, and populate each car in your array. Your loop will also identify which car your are getting details for

Call your showCars function, to display all of the cars in your array.

Declare an integer array named nbrs the size of SIZE with the values: 200, 300, and 100.

Write a loop that:
Displays each number.
ALSO in your loop, find out which number is the largest number.

After the loop, display your variable with the largest number.

Declare 2 constant integers: ROW with a value of 2, and COL with a value of 5.
Declare a 2-dimensional array named pets the size of ROW and COL.
Populate it with 5 cats and 5 dogs.
Write a nested loop to display all cats and dogs.

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY