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
alexandr1967 [171]
3 years ago
9

Assume the following two classes as Person and Working: class Person { int personID, age; String fName, middleName, lastName; ..

. // the code here is irrelevant to the question } // end of Person class class Working { int personAge; boolean isUnderEighteen(Person p) { personAge = p.age; if personAge <18 System.out.println("The person is under age and cannot work"); else System.out.println("The person can legitimately work"); } } // end of Working class
A.)What type of a coupling is provided between Person and Working classes in this design? Why?B.) What problem will this type of coupling cause?C.) Suggest a new design to fix this problem you’ve mentioned in 2B. Please write down your new code and also explain.
Computers and Technology
1 answer:
Troyanec [42]3 years ago
4 0

Answer:

A)

This is an example of tight coupling since the class Working has to have an idea of how Person is implemented to complete its own implementation.

B)

Any change in the Person class would require a change in the working class too.

C)

CODE

class Person {

int personID, age;

String fName, middleName, lastName;

public int getAge() {

return age;

}

}

// end of Person class

class Working extends Person {

boolean isUnderEighteen() {

if (super.getAge() <18) {

System.out.println("The person is under age and cannot work");

return true;

}

else {

System.out.println("The person can legitimately work");

return false;

}

}

}

Explanation:

You might be interested in
What runs horizontally and is identified with numbers?
kramer
D. the answer is Column 
6 0
3 years ago
Read 2 more answers
Marla wants to transfer photos from her digital camera to her computer. She has plugged the camera's cord into the USB port. Wha
QveST [7]
She needs to make sure the camera is on and working, if she doesn't than it wont tranfer
3 0
2 years ago
Read 2 more answers
A company is experiencing overwhelming visits to a main web server. The IT department is developing a plan to add a couple more
Varvara68 [4.7K]
The answer is C) Availability.

Although the company is addressing scalability by adding more servers, the question is asking for security requirement. Therefore we need to choose one of the principles from CIA triad which includes confidentiality, integrity, and availability.

Integrity involves keeping the data accurate and confidentiality involves keeping the data between the sender and intended recipient(s). That being said, scalability and availability are the possible answers.

C) Availability is the best answer because it is part of the CIA triad.

Note: Another resource to look at for cyber security principles would be the Parkerian Hexad.
5 0
3 years ago
Read 2 more answers
Which function of NOS involves swapping programs and files
yaroslaw [1]
The answer is Multitasking. NOS (Network Operating System) has the ability to execute more than one program at a time.  It allows different programs to operate on the CPU, effectively giving each program a virtual copy of the CPU while preventing the program from directly manipulating the hardware. The NOS switches the CPU time from one task  to another in order to create the idea that several tasks are being executed at the same time, but in reality, only one program is being executed. 
6 0
3 years ago
Which of the following best explains the different between Cut and Copy? a. When you copy text you are permanently deleting it,
Vilka [71]
B. When you copy text it remains in its original location and places it on the clipboard. Cutting text removes it from its original location and places it on the clipboard

5 0
3 years ago
Read 2 more answers
Other questions:
  • The most effective way to perform data entry is to keep your hands on the keyboard and press to move to the text cell in the row
    10·1 answer
  • How does consumption of alcohol affect your driving skills? Name three ways that alcohol can affect your driving.
    15·2 answers
  • How do open online courses help with independent learning? (1 point)
    13·2 answers
  • A professional bureaucracy is a knowledge-based organization where goods and services depend on the expertise and knowledge of p
    7·1 answer
  • 1.Terry turned on his computer one day to find that all of the storage on his computer was filled up. Furthermore, there were ma
    6·1 answer
  • QUESTION 16
    14·1 answer
  • Code written by computer programmers is translated to binary code, so computers can understand the instructions. True or False
    7·1 answer
  • If you were required to give a speech identifying the risks of using computers and digital devices, which group of items would y
    7·1 answer
  • ANSWER QUICKLY!!!
    5·1 answer
  • What is a simple definition for electricity?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!