Starting from:

$30

ECE 39595 Homework 4

HW 4
Part A:
Using the code in the directory PartA, convert Vehicle to be an abstract class. Make all functions that are
overridden with different functionality in HondaFit and FordF350 pure virtual functions. Make functions
that have the same functionality in HondaFit and FordF350 concrete functions with implementation.
Make sure the program compiles and runs with the same output as in HW2.
Part B:
In the PartB directory there is a Makefile and some C++ code that doesn’t compile. This homework will
have three steps, which you will perform by editing the code in PartB. You will turn in only the final
code.
Step 1: get the program to compile
Step 2: (you may end up doing some of these as part of Step 1, that’s ok)
1. Modify the Address constructor so that its body (what is between the “{“ and “}”) is empty and use
initializer lists to do all initialization.
2. Modify the Person constructor so that the body only contains the initialization of dateOfBirth, but all
initializations are done.
3. Modify the Employee constructor so that its body is empty but all initializations are done.
4. Enable all functions to be callable as virtual functions.
5. Any other changes you need to make to get the desired output (see below).
Step 3: Convert the program to use no pointers and no new operations, i.e. use object variables
whenever possible
The output of Part B when finished will look like:
add1:
1281 Gruene Rd
Greune
TX
78130
add2:
801 Bldg
Yorktown Heights
NY
10598
Employee1: Employee, Jerry Jeff Walker, 78130
Employee2: Employee, Fran Allen, 10598
What to turn in:
Your final code should have the following directory structure: The outer directory will be called userid.
Under it will be a PartA and a PartB directory. These in turn will contain the code for PartA and PartB. Do
not turn in any .o or executable files. Your code should compile by executing g++ *.cpp in the directory
containing your code.

More products