0% found this document useful (0 votes)
34 views1 page

#Include #Include #Ifndef #Define: "Car.h"

This C++ class defines a Minivan object that inherits from the Car class. It includes private attributes for the manufacturer, seating capacity, and cargo space. It has a constructor that allows setting these attributes as well as the color. Methods are included to get vehicle details, set the color, and get the type.

Uploaded by

loene
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views1 page

#Include #Include #Ifndef #Define: "Car.h"

This C++ class defines a Minivan object that inherits from the Car class. It includes private attributes for the manufacturer, seating capacity, and cargo space. It has a constructor that allows setting these attributes as well as the color. Methods are included to get vehicle details, set the color, and get the type.

Uploaded by

loene
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

/*

NAME : Minivan
PURPOSE : The purpose of this class is to keep track of minivan specific
details
*/

#include <stdio.h>
#include "car.h"
#ifndef __MINIVAN_H__
#define __MINIVAN_H__

class Minivan : public Car


{
/* ====================================== */
/* PRIVATE */
/* ====================================== */
private:
/* -------------- ATTRIBUTES ------------ */
char manufacturer[25];
int hasSeating;
int cargoSpace; // sq feet

/* ====================================== */
/* PUBLIC */
/* ====================================== */
public:

Minivan(char* whoMade, int mpg, int seating, int space, char* whatColor = "Not
Painted\0");
virtual ~Minivan(void);
void VehicleDetails(void);

virtual void SetColor(char* newColor); // technically I don't need to specify


these methods as virtual because
virtual char* GetType(void); // they are (given the
parent class definition) - but for readability I
// am
placing the "virtual" keyword here as well
};

#endif

You might also like