Class license

Define a class License. A License has a license number and an expiration date (I suggest using java.time.LocalDate, but there are other possibilities). Then do the following: (a) Think what it might mean for two License instances to represent the same real- world license. Write the Boolean equals method that takes another License as argument and returns true if the two Licenses are “equal” in this sense. The block comment for your method should explain how you are doing the comparison. (b) Write a Boolean method expired that returns true if the current date is after the expiration date of the License, otherwise false. (c) Define the class DriversLicense as a subclass of License. In addition to the properties of a License, a DriversLicense also has the state that issued the license (you can use a string for this). (d) Suppose that driver’s licenses from different states may have the same license number. Override the equals method for DriversLicense to do the right thing when testing if two DriversLicenses are equal. (e) Define the class TruckDriversLicense that extends DriversLicense. Override the toString method to return a meaningful description of an instance. (f) Define the class FishingLicense which extends License. In addition to the properties of a License, a FishingLicense specifies what types of may be caught (you can use a string for this). Override the toString method. Illustrate all of these with a main method in a separate test class.

We help you get better grades, improve your productivity and get more fun out of college!!

How it works – it’s easy

Y

Place your Order

Submit your requirements through our small easy order form. Be sure to include and attach any relevant materials.

Make a payment

The total price of your order is based on number of pages, academic level and deadline.

i

Writing process

We assign the assignment to the most qualified tutor. When the tutor completes the assignment, it is transferred to one of our professional editors to make sure that the assignment meets all of your requirements.

Once complete, we’ll send your assignment via the email provided on the order form.

 

 

Achieve academic success with the best online tutors.