1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nikitadnepr [17]
4 years ago
14

Create an abstract Division class with fields for a company's division name and account number, and an abstract display() method

that will be defined in the subclasses. Use a constructor in the superclass that requires values for both fields. Create two subclasses named InternationalDivision and DomesticDivision. The InternationalDivision class includes a field for the country in which the division is located, a field for the language spoken, and a constructor that requires all fields when created. The DomesticDivision class include a field for the state in which the division is located and a constructor that requires all fields when created. Write an application named UseDivision that creates two instances of each of these concrete classes.
Computers and Technology
1 answer:
Paha777 [63]4 years ago
8 0

Answer:

// SAVE IN Division.java

public abstract class Division

{

protected String name;

protected String account_number;

public Division(String nam,String ac)

{

name = nam;

account_number = ac;

}

public abstract void display();

}

// END OF Division.java

// SAVE IN InternationalDivision.java

public class InternationalDivision extends Division

{

private String country;

private String language;

public InternationalDivision(String nam, String ac,String country,String lan)

{

super(nam,ac);

this.country = country;

this.language = lan;

}

public void display()

{

System.out.println( " name of company is " + name);

System.out.println( " Account number of company is " + account_number);

System.out.println( " company located in " + country);

System.out.println( " people in that company speak " + language);

}

}

// END OF InternationalDivision.java

// SAVE IN DomesticDivision.java

public class DomesticDivision extends Division

{

private String state;

public DomesticDivision(String nam, String ac,String sta)

{

super(nam,ac);

state = sta;

}

public void display()

{

System.out.println( " name of company is " + name);

System.out.println( " Account number of company is " + account_number);

System.out.println( " company located in the state " + state);

}

}

// END OF DomesticDivision.java

// SAVE IN UseDivision.java

public class UseDivision

{

public static void main(String[] args)

{

InternationalDivision ID1 = new InternationalDivision("Hero","11223344","China","Chinesse");

ID1.display();

System.out.println();

InternationalDivision ID2 = new InternationalDivision("Honda","1122334455","Singapore","Tamil");

ID2.display();

System.out.println();

DomesticDivision DD1 = new DomesticDivision("Ford","77223344","Arizona");

DD1.display();

System.out.println();

DomesticDivision DD2 = new DomesticDivision("Maruti","6188994455","Alaska");

DD2.display();

}

}

// END OF UseDivision.java

You might be interested in
Which of the following gives the
satela [25.4K]

Answer:

a. Competitive advantage

7 0
3 years ago
Read 2 more answers
On the Attendance worksheet, in cell L5, enter an IF function to determine if the percentage in cell K5 is greater than or equal
Ad libitum [116K]

Answer:

=IF(K5>=H18,"Goal Met", "Review")

Explanation:

The syntax of if the statement is as below:

=If( logic test, if true then this, if false then this)

And hence, and as in question logic test is k5>=H18, and on true the output should be Goal met, and on false the output should be review. And hence, we get the above formula, and which is the required answer.

8 0
3 years ago
A nonprofit organization uses a contact management database to track donations, amounts donated, and all correspondence and phon
notka56 [123]

Answer:

nvbvbnvvbnbnvbnvbn

Explanation:

vbnvbnvbnbnnnbvnn

7 0
3 years ago
Which destination ipv4 address does a dhcpv4 client use to send the initial dhcp discover packet when the client is looking for
Dima020 [189]
<span>A DHCPv4 client use the broadcast IP address to send the initial DHCP discover packet when the client is looking for a DHCP server. </span><span>
A workstation will send a DHCPDISCOVER message to start the process of obtaining a valid IP address. The client  does not know the addresses of DHCP servers, and that's why it sends the message via broadcast, with destination addresses of FF-FF-FF-FF-FF-FF and 255.255.255.255.</span>
5 0
4 years ago
Can somone give me advice!
DENIUS [597]

Answer:

if you are scared just do it through text and btw life is short go for it

Explanation:

and if he says no there is plenty of more people out there

3 0
3 years ago
Read 2 more answers
Other questions:
  • Which method of deleting files can be used in windows xp and vista?
    12·1 answer
  • Which practice enables recovery of accidental deletions in data records?
    15·2 answers
  • Which of the following is NOT true of input validation?
    7·1 answer
  • Melissa and Sue want to distribute a document to be discussed at a meeting starting in about thirty minutes. People will be atte
    14·1 answer
  • What is a service-oriented architecture? Group of answer choices A business-driven enterprise architecture that supports integra
    13·1 answer
  • You will be given a value of n and k, one line each. You will write a program that determines the minimum number of probe attemp
    9·1 answer
  • Which philosopher believed that if we carefully examine the contents of our experience, we find that there are only two distinct
    10·1 answer
  • What was Pike's objective on his first expedition in 1805?​
    9·1 answer
  • Gauthmath https://s.tutorus.xyz/lp/invite?code=GGQGBL​
    13·1 answer
  • You have probably heard of wearable fitness devices, such as FitBit. What new products do you think might exist in this field in
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!