answer.
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]
2 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]2 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
You are describing the boot process to a friend and get to the step where the device loads the operating files into RAM, includi
EastWind [94]

I would say, "not those kinds of kernels, when I say kernel, I mean the core of your computers operating system. It controls all of the system components and tell specific parts of the computer to do certain things." or in more compact terms, "think of the kernel as the brain of the computer, telling each system component what to do."

5 0
1 year ago
A(n) ____________________ is a named collection of stored data, instructions, or information and can contain text, images, video
Vanyuwa [196]
The answer in the blank is files for they exist in the computer that are responsible to hold or collect different types of application that could contribute in arranging them in order or showing classifications or simply storing them to put them in one place. This is essential to the computer for they are responsible in putting them in place and showing organization.
7 0
2 years ago
Read 2 more answers
How has the perception of the hacker changed over recent years? What is the profile of a hacker today?
finlep [7]

Answer:

Hackers frequently spend long hours examining the types and structures of targeted systems because they must use guile, or fraud to bypass the controls placed on information owned by someone else.

Explanation

The perception of a hacker has evolved over the years.

  • The traditional hacker profile was a male, aged 14 to 18.
  • 76% of hackers are men whose ages are between 14 years (8%) to 50 (11%). The average age is 35 years (43%).
  • A hacker is persevering, patient, creative, bright and having a passion for what he does.
  • Hackers today can be expert or novices.
  • The experts create the software and schemes to attack computer systems.
  • While the novices merely use software created by the experts.
4 0
2 years ago
g Fill the validateForm function to check that the phone number is 10 characters long and that the user name is less than 11 cha
Rom4ik [11]

Answer:

function validateForm(event)

{

event.preventDefault();

var phoneNumber = form.phoneNumber.value;

var userName = form.userName.value;

if(phoneNumber.length!=10)

console.log("Phone Number is Invalid");

if(userName.length<11)

console.log("User Name is Invalid"); }

8 0
1 year ago
Which of the following is a job that does not lend itself to telecommuting?
jonny [76]

Answer:

a car salesman who demonstrates the features of a new model of car

Explanation:

Telecommuting can be defined as the process or making use of a telephone, email, or the internet to achieve your daily work. An attorney that spends most of her time researching on the computer is making use of an internet to do her work and hence telecommuting is employed. A copywriter for an advertising firm also makes use of email in the process of write copying and hence telecommuting is employed. A telemarketer uses the telephone and a product support who handles queries sent by customers also uses the internet and emails and telephones and hence they all use telecommuting. Demonstrating the feature of a new car does not use require the use of a telephone, email, or the internet.

8 0
1 year ago
Other questions:
  • Why would Network Systems employees be employed by the government?
    12·2 answers
  • #A year is considered a leap year if it abides by the #following rules: # # - Every 4th year IS a leap year, EXCEPT... # - Every
    5·1 answer
  • Menus are attached to windows by calling the _____ method.
    8·1 answer
  • A file concordance tracks the unique words in a file and their frequencies. Write a program that displays a concordance for a fi
    6·1 answer
  • If there are 8 opcodes and 10 registers, a. What is the minimum number of bits required to represent the OPCODE? b. What is the
    10·1 answer
  • Which of the following can you NOT apply for at any FLHSMV office? A. Certificate of title B. License plates C. Vehicle registra
    15·2 answers
  • Access-lists pose a logical problem which often has more than one solution. Can you think of a different set of rules or placeme
    8·1 answer
  • How can a signature be added to an email message? Check all that apply.
    10·2 answers
  • A _______ bulb contains a high-pressure gas. Oils from the hands can affect the expansion of the glass, which can shorten the li
    13·1 answer
  • The word “computer” has become associated with anything related to screens and keyboard. However, these are not the only parts t
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!