Question: In java Part One You have been employed by the FlA to design software for use with the Formula One. You need to design, using

In java
Part One
You have been employed by the FlA to design software for use with the Formula One. You need to design, using pseudocode, two classes:
Team and Driver.
A Team requires the following items:
Name: the name of the team (class field)
Engine Manufacturer: the engine manufacturer's name (class field)
Driver One: the team's main driver (class field of Driver type)
Driver Two: the team's second driver (class field of Driver type)
A Driver requires:
Name: the name of the driver (class field)
Nationality: the driver's nationality (class field)
Create only the constructor with parameters for each class, all accessors and mutators for each class, and a toString() and equals () method for each class.
Things to note: all instance variables must always contain appropriate data. That is, they cannot be blank when instantiated. (35 marks]
Part Two
Convert your pseudocode from Part One of this question into Java code. Create a test harness program: that is, a program that tests each class through utilising the methods (including constructors) belonging to the classes.
The test program should test the constructor, accessors, mutators, equals) and toString() methods in the Team class as this will also test the Driver class given there is a Driver class object in the Team class.
Please note, you may assume that the copy constructor and default constructors exist and function as discussed within the lectures. In this way if you needed them, you may call them under the assumption that they exist. (45 marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!