Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(JAVA) 3) The previous problem, we modeled a Dog class for a dog tracking application. In this problem we will model a Dog license for

(JAVA)

image text in transcribedimage text in transcribed

3) The previous problem, we modeled a Dog class for a dog tracking application. In this problem we will model a Dog license for the same application. The Dog license object captures data on the dog's license number, license year, licensing authority etc. We are now planning to create and store dog licenses using a new application. To do this we need to create the required classes and their functions This dog application will capture these properties in a separate class called DogLicense Create a class called DogLicense with the following instance variables: licenseNum, license Year and name of the type int, int and String, respectively. The DogLisense class is supposed to keep the instance variables private. However, these instance variables are to be accessed by the client application. Therefore, the class requires getters and setters for each instance variable, except for setting the licenseNum. The licenseNum is set only once during the lifetime of the Doglicense object using the createLicenseNum method as described below. Some dogs may not have a license number initially and they may need to be generated later on. To do this, the DogLisense class will have a method called create LicenseNum. This method will take in an integer argument called customlD_This method has a void return. This method will assign a value to the instance variable licenseNum= (500*customID) license Year The DogLicense class requires a default constructor. Use default values of your choice for the instance variables. The DogLicense class requires an overloaded constructor with all three 3-arguments. Answer: In plain English, write all the requirements (make sure to number them) of the DogLicense class. Then, write the class code for Dog License class in Java, to meet all the requirements. Make sure your code is error free. Write and compile your code using the IDE. Copy paste your code here. DogLicense -licenseNum:int -license Year:int -name:String +DogLicense) +Doglicense(int,int,String) +getLicenseNum():int +getLicenseYear():int +getName():String +setLicense Year(int):void +setName(String):void +createLicenseNum(int):void

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions

Question

differentiate the function ( x + 1 ) / ( x ^ 3 + x - 6 )

Answered: 1 week ago