Question: Part A Create an abstract Division class with fields for a company s division name ( divisionTitle ) and account number ( acctNum ) ,
Part A
Create an abstract Division class with fields for a companys division name divisionTitle and account number acctNum and an abstract display method. Use a constructor in the superclass that requires values for both fields.
Part B
Create two subclasses named InternationalDivision and DomesticDivision.
The InternationalDivision subclass includes a field for the country in which the division is located country and a field for the language spoken language; its constructor requires both.
The DomesticDivision subclass includes a field for the state in which the division is located state; a value for this field is required by the constructor.
Part C
Write an application named UseDivision that creates a Division reference. Ask the user whether a D for a DomesticDivision or I for an InternationalDivision object should be created. Prompt for appropriate values and assign a new subclass object to the Division reference. Then display the details of the created object.
An example of the program is shown below:
Is this for a Domestic or International division? D
Enter division name Division
Enter acct number
Enter state Iowa
Domestic Division: Division Division Acct#
Located in Iowa
Task : Create the Division class.
Task : Create the InternationalDivision class.
Task : Create the DomesticDivision class.
Task : Create the UseDivision class.
Task : The UseDivision program accepts user input and displays the correct information on the division.
please complete all the tasks
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
