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
Design and implement a class called Sphere that contains instance data that represent the sphere’s diameter. Define the Sphere c
Zolol [24]

Answer:

Import java.awt.*;

import java.util.*;

public class Sprhere

{// Instance Data private double surfaceA, volume, r, diameter; //Constructors public Sphere ()

{r = 0;diameter = 0; surfaceA = 0;volume = 0;}

public Sphere (double radius, double d, double SA, double v)

{this. r = radius; this. diameter = d; this. surfaceA = SA;this.volume = v;}

//--------------------------------------------------------------------// Accesors.//--------------------------------------------------------------------public double get Radius()

{return r;}

public double get Diameter()

{return diameter;}

public double get SurfaceA()

{return surfaceA;}

public double get Volume()

{return volume;}

//--------------------------------------------------------------------// Mutators.//--------------------------------------------------------------------

3 0
3 years ago
As a final lesson to her team, Katie shows them a job that has already been preflighted and is now getting ready to be sent to t
Vsevolod [243]

Answer:

Printed

Explanation:

The job was finished and sent to the printer. In the printer, you have to waite to be printed

5 0
3 years ago
Different algorithms can be made to complete the same task in different ways.
musickatia [10]

Answer:

True hope this helps you and everyone!

7 0
2 years ago
Read 2 more answers
Describe the concepts of confidentiality, integrity, and availability (C-I-A), and explain each of the seven domains of a typica
GREYUIT [131]

Answer:

Answer explained below. The remaining part of the question is incomplete

Explanation:

The concepts of confidentiality, integrity, and availability (C-I-A) can be explained in following given points.

1) Confidentiality: Its basically refer to the confidentiality of the information. Here we can think about the protection of the information from unauthorized person. Confidentiality enuser that at what level your information is secured and no unauthorized access will be done to the information. For maintaining the confidentiality, we can use various encryption methods. The main concept of confidentiality is to enforce various techniques like encryption, file permissions and access control to restrict access to important information.

2) Integrity: Integrity of the information refer to the unwanted modification of the information. Integrity of the data as well as the information should be maintained and only the autorized person can access as well as modify the information. For enforcing the integrity, we can implement various hashing techniques on information.

3) Availability: Availability refers to the availability of the information, when ever an autorized person requests for the information. High availability of the information should occur, so that any autorized person can access it, when ever its required. For high availability, we can create backup as well as replicate the data across the geo sites.

Seven domains of a typical IT infrastructure are given below:

1) User Domain: Its refer to the group of users as well as the person who access the information systems.

2) LAN Domain: Refer to the local area network, where various computers are connected to each other.

3) Workstation Domain: The area is called workstation, where various users connect to the IT infrastructure.

4) WAN and LAN link domain: Refer to the connection of local area network to wide area network.

5) WAN domain: Refer to the wide area network, connection of computers in large area.

6) Storage Domain: Refer to the storage, where we store the data.

7) Remote Access Domain: Refer to the domain where mobile user can access the local as well as wide network remotely.

8 0
3 years ago
The main purpose of a honeypot is Select one:
masya89 [10]

Answer:

d. To help security professionals better understand and protect against threats to the system

Explanation:

The main purpose of a honeypot is to attract potential hackers and allow them to have access to a network system that is not the actual live network with close monitoring. This is done so as to learn and understand the intentions of the hacker and how they execute an attack. With this knowledge security professional are in a better position to deal with potential threats and keep the network secure.

4 0
3 years ago
Other questions:
  • Someone help me I don’t know what to do /COMPUTER SCIENCE
    5·1 answer
  • What is the last step in conducting url search
    11·1 answer
  • You are to create a program using Python that asks the user for a nonnegative number, then computes the mean and variance using
    15·1 answer
  • Which motherboard slot has direct access to the north bridge?
    7·1 answer
  • The speed of sound depends on the material the sound is passing through. Below is the approximate speed of sound (in feet per se
    9·1 answer
  • How can you have a safe browser experience
    9·1 answer
  • What is another word for: a location in memory that contains a value? A. integer B. Boolean C. variable D. float PLEASE HELP URG
    10·1 answer
  • Which of the following formats can algorithms NOT be written in:
    8·2 answers
  • Write a program using LinkedList class and ListIterator interface to demonstrate the following activities:
    6·1 answer
  • a network administrator for a large oil company has discovered that a host on the company network has been compromised by an att
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!