Quiz 1, Thursday, 9/11
(20 minutes. Open notes)
Write a method called maxPay for the RecordDB class that
finds and returns the record of an employee with maximum pay.
If several employees have the maximum pay, it is fine to return
the record of any one of these employees.
Make sure that your method correctly deals with the case in which
the RecordDB object has no employees.
Suppose that we want to build a myDirectedGraph class for
representing directed graphs.
Recall that a directed graph consists of directed edges, i.e., edges that
go from one vertex to another vertex.
It makes sense to simply modify the code for the myGraph class,
in order to do this.
The following questions explore this a bit further.
- Would you make any changes to the data members of the
myGraph class? If so what?
- Would you make any changes to the constructor
public myGraph(int capacity)
in the myGraph class? If so what?