guys I need help in this exercise mainly after the letter d) in the creation of another class, here is the first class I did in a header file
Statement of the exercise:
1- Make a program for registration and consultation of new or used vehicles.
a) Define an Automovel class, which has the following information:
- brand - marca
- year - ano
- status (which can be sold or available)
- color - cor
- price - preco
- model - modelo
- state - estado
b) Define a constructor method for the Automovel class that initializes the values of the attributes by passing defined arguments.
c) Define the get and set methods for all attributes and methods.
d) Elaborate another class (UsaAutomovel) to test the Automovel class where:
- A list of automobiles must be created by creating objects of the Automovel class.
- Define a method for filling in data about a car and add it to the list.
e) Make a method to search for vehicles by brand lookBrand - lists the car of a certain brand.
f) make a method that allows the sale of a vehicle.
g) Define in the main class (UsaAutomovel) the following options: List cars and total sales.
2- Create two classes that inherit the characteristics of the automobile class.
#ifndef AUTOMOVEL_H
#define AUTOMOVEL_H
class Automovel
{
int ano;
string marca, modelo, cor, estado, status;
float preco;
Hint: You can hit "edit post", highlight your code and then press the <> formatting button. This will not automatically indent your code. That part is up to you.
I've found it's easiest to copy and paste pre-indented code directly from the IDE, that way it is already properly formatted.
You can use the "preview" button at the bottom to see how it looks.