subject

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.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:30
What is the most popular genre of video games?
Answers: 1
question
Computers and Technology, 22.06.2019 23:00
Is an attack that relies on guessing the isns of tcp packets
Answers: 2
question
Computers and Technology, 23.06.2019 12:00
Using the list, you can select the number of photos that will appear on each slide. a. theme b. frame shape c. pictures in album d. picture layout
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Examine the list below. which factors positively affect lifetime income? check all that apply.
Answers: 1
You know the right answer?
Assume the following two classes as Person and Working: class Person { int personID, age; String fNa...
Questions
Questions on the website: 13722361