License - a string representing a drivers license id eg


In Java define a class called Driver that defines the following attributes:

license - a String representing a driver's license ID (e.g. "L0678-67825-83940"); name - a String representing the name of the driver street - a String representing the street name and number for this driver (e.g., "12 Elm St."); city - a String representing the city in which this driver lives province - a String representing the province in which this driver lives

Write the following in the Driver class: 1. a proper constructor that takes 5 parameters for all 5 attributes in the order shown above 2 a proper zero-parameter constructor that calls the first constructor with appropriate values 3.a toString() method that returns a string in the following format:

"#L0678-67825-83940 John Doe living at 12 Elm St., Ottawa, ON"

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: License - a string representing a drivers license id eg
Reference No:- TGS02644065

Now Priced at $10 (50% Discount)

Recommended (93%)

Rated (4.5/5)