Question: write a program C++ about Copmputer struct Redo lab 3 and change the Computer class to a struct. 1. Keep the default and non-default constructors
Redo lab 3 and change the Computer class to a struct. 1. Keep the default and non-default constructors 2. Your struct does not need the accessors and mutators since all variables are public by default. 3. Write a main(): - Create an instance of type Computer using the default constructor. - Set the values for year, model, and purpose using any values you'd like. - Print the values of year, model, and purpose to the standard output. - Prompt the user to enter a value for year, model, and purpose - Create a new instance of type Computer using the non-default constructor. - Print the values of year, model, and purpose
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
