C++ HELP! NO STRUCTURES USED! Hello I've tried to ask this question before, but the answer I received was incorrect, so I am asking once again for someone to help me with this problem.  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. Sample output: Get car 1 details Enter make: Ford Enter model: Mustang Enter price: 28000 Get car 2 details Enter make: Chevy Enter model: Corvette Enter price: 42000 Get car 3 details Enter make: Jeep Enter model: Cherokee Enter price: 26000 Car 1 details: make Ford, model Mustang, price 28000 Car 2 details: make Chevy, model Corvette, price 42000 Car 3 details: make Jeep, model Cherokee, price 26000 Nbr is: 200 Nbr is: 300 Nbr is: 100 Max number is: 300 Pets table CATS: Siamese Burmese Persian Tabby DOGS: Collie Poodle Labrador Beagle

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

C++ HELP! NO STRUCTURES USED!

Hello I've tried to ask this question before, but the answer I received was incorrect, so I am asking once again for someone to help me with this problem. 

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.

Sample output:
Get car 1 details
Enter make: Ford
Enter model: Mustang
Enter price: 28000
Get car 2 details
Enter make: Chevy
Enter model: Corvette
Enter price: 42000
Get car 3 details
Enter make: Jeep
Enter model: Cherokee
Enter price: 26000
Car 1 details: make Ford, model Mustang, price 28000
Car 2 details: make Chevy, model Corvette, price 42000
Car 3 details: make Jeep, model Cherokee, price 26000

Nbr is: 200
Nbr is: 300
Nbr is: 100
Max number is: 300

Pets table
CATS: Siamese Burmese Persian Tabby
DOGS: Collie Poodle Labrador Beagle

Expert Solution
steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Knowledge Booster
Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education