Assume the existence of a Building class. Define a derived class, ApartmentBuilding that contains four (4) data members: an integer named numFloors, an integer named unitsPerFloor, a boolean named hasElevator, and a boolean named hasCentralAir. There is a constructor containing parameters for the initialization of the above variables (in the same order as they appear above). There are also two function: the first, getTotalUnits, accepts no parameters and returns the total number of units in the building; the second, isLuxuryBuilding accepts no parameters and returns true if the building has central air, an elevator and 2 or less units per floor.

Answers

Answer 1

Answer:

Explanation:

The following code is written in Java. The class ApartmentBuilding extends the assumed class of Building but does not call any of its methods since we do not have access to it. The ApartmentBuilding class contains all of the variables listed, as well as constructor and methods, including getter and setter methods for each variable. A test case for the class is provided in the image below with it's output.

class ApartmentBuilding extends Building {

   int numFloors, unitsPerFloor;

   boolean hasElevator, hasCentralAir;

   public ApartmentBuilding(int numFloors, int unitsPerFloor, boolean hasElevator, boolean hasCentralAir) {

       this.numFloors = numFloors;

       this.unitsPerFloor = unitsPerFloor;

       this.hasElevator = hasElevator;

       this.hasCentralAir = hasCentralAir;

   }

   public int getTotalUnits() {

       int total = this.numFloors * this.unitsPerFloor;

       return total;

   }

   public boolean isLuxuryBuilding() {

       if ((this.hasCentralAir == true) && (this.hasElevator == true) && (this.unitsPerFloor <= 2)) {

           return true;

       } else {

           return false;

       }

   }

   public int getNumFloors() {

       return numFloors;

   }

   public void setNumFloors(int numFloors) {

       this.numFloors = numFloors;

   }

   public int getUnitsPerFloor() {

       return unitsPerFloor;

   }

   public void setUnitsPerFloor(int unitsPerFloor) {

       this.unitsPerFloor = unitsPerFloor;

   }

   public boolean isHasElevator() {

       return hasElevator;

   }

   public void setHasElevator(boolean hasElevator) {

       this.hasElevator = hasElevator;

   }

   public boolean isHasCentralAir() {

       return hasCentralAir;

   }

   public void setHasCentralAir(boolean hasCentralAir) {

       this.hasCentralAir = hasCentralAir;

   }

}


Related Questions

A computer that supports LoJack technology must have two main components installed. It needs an Application Agent (residing in the OS), which sends tracking signals that enable location and recovery of a stolen device. The other component is a Persistence Module, which restores the Application Agent and allows it to survive reinstallation of an operating system or reformatting of the hard drive. The highest level of security offered by LoJack can be achieved when Persistence Module resides in the:

Answers

Answer: Computer's BIOS

Explanation:

Following the information given in the question, the highest level of security that is offered by LoJack can be achieved when Persistence Module resides in the computer's BIOS.

The BIOS (basic input/output system) refers to the program which the microprocessor of a computer uses in starting the computer system when the computer is powered on. It should also be noted that the BIOS is used in managing the data flow that exist between the operating system of the computer and the attached devices like the keyboard, hard disk, mouse, etc.

The CPU is responsible for?

Answers

The CPU (Central Processing Unit) is the part of a computer system that is commonly referred to as the "brains" of a computer. The CPU is also known as the processor or microprocessor. The CPU is responsible for executing a sequence of stored instructions called a program .

Programming languages create codes that represent binary numbers so that programmers can write in a language closer to natural speech.

Answers

Answer:

True

Explanation:

A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer how to perform a specific task and to solve a particular problem.

This ultimately implies that, programming languages are designed and developed for creating codes that represent binary numbers (0s and 1s), so that programmers or software developers can write in a language closer to natural speech i.e the human language.

You are concerned that if a private key is lost, all documents encrypted using your private key will be inaccessible. Which service should you use to solve this problem

Answers

Answer:

Key escrow.

Explanation:

Cyber security can be defined as preventive practice of protecting computers, software programs, electronic devices, networks, servers and data from potential theft, attack, damage, or unauthorized access by using a body of technology, frameworks, processes and network engineers.

In Cyber security, encryption is a form of cryptography and typically involves the process of converting or encoding informations in plaintext into a code, known as a ciphertext.

Typically, an information or data that has been encrypted can only be accessed and deciphered by an authorized user.

Hence, if a private key is lost, all documents encrypted using that private key will be inaccessible to the users. Thus, the service that can be used to solve this problem is a key escrow because the cryptographic (private) keys kept in an escrow system are protected and would not be released to anyone other than the original user (owner).

A key escrow can be defined as a data security method of storing very essential cryptographic keys.

Simply stated, key escrow involves a user entrusting his or her cryptographic key to a third party for storage.

As a standard, each cryptographic key stored or kept in an escrow system are directly linked to the respective users and are encrypted in order to prevent breach, theft or unauthorized access.

describe in detail what each step would look like if you ran into a software error.

Answers

Answer:

First you have to identify the problem.

Second Gather information.

Third iterate through potential solutions.

Fourth Test your solution.

Explanation:

There are many different ways to handle errors in software but this is the way I do it.

Hope this helps :)

After running into a software error, a user needs to first determine the reason for the error, work towards a solution and then execute the solution discovered.

Software Error

A software error occurs when an error or unusual behaviour is observed in a piece of software and which can be reproduced after certain actions are performed that are in line with the stated rules of the software developer. In other words, a software error does not occur if the software was not used as directed by the software developer.

You can learn more about software errors here https://brainly.com/question/18497347

#SPJ6

A logistics company's vulnerability scan identifies the following vulnerabilities on Internet-facing devices in
the DMZ: SQL injection on an infrequently used web server that provides files to vendors SSL/TLS not used for a website that contains promotional information
The scan also shows the following vulnerabilities on internal resources: Microsoft Office Remote Code Execution on test server for a human resources system
TLS downgrade vulnerability on a server in a development network In order of risk, which of the following should be patched FIRST?
A. Microsoft Office Remote Code Execution
B. SQL injection
C. SSL/TLS not used
D. TLS downgrade

Answers

Answer:

A. Microsoft Office Remote Code Execution

Explanation:

From the given options, we have;

The web server having a SQL injection is infrequently use

The information on the website having SSL/TLS not used is promotional

The location of the server having  a TLS downgrade is on a development network

The location of the Microsoft Office Remote Code Execution is on a human resource system test server

Therefore, given that the test server, is the deployment source of the main server, and that with a Remote Code Execution, RCE,  cyber attack, the attacker is able to make commands work on other computers, the RCE attack on the test server is a potential access of an attack on the main servers, and should be patched first.

Which of these is NOT an input device?
O keyboard
O mouse
O blinking light
O microphone

Answers

Blinking light is not one of the awansers

why the internet is not policed​

Answers

Answer:

The Internet allows people to circumvent law by committing criminal acts from areas where their activities are not illegal. Those areas will always exist, and thus new regulations will be just as ineffective as the old ones are ["Net Needs Law Enforcement, Author Says,"]. But Internet traffic is marked with IP addresses, and those addresses can be tied to specific networks with specific locations. Shouldn't it be possible to separate traffic based on the originating network and treat data coming from relatively insecure locations differently than data coming from relatively secure locations? It would be much harder for someone in a rogue nation to hack a network if he had to hack an intermediary network first. And unlike government regulation, which has zero impact in areas where these threats are likely to originate, separating traffic by location might actually work

You are in charge of installing a remote access solution for your network. You decide you need a total of four
remote access servers to service all remote clients. Because remote clients might connect to any of the four
servers, you decide that each remote access server must enforce the exact same policies. You anticipate that
the policies will change frequently.
What should you do? (Select two. Each choice is a required part of the solution.)
A. Configure network policies on the RADIUS server.
B. Make each remote access server a member of the RemoteServers group.
C. Configure the exact same network policies on each server.
D. Configure one of the remote access servers as a RADIUS server, and all other servers as RADIUS clients.
E. Use Group Policy to configure network policies in the default Domain Controllers GPO.
F. Configure each remote access server as a domain controller.

Answers

Answer: configure one of the remote access servers as a RADIUS server and all other servers as RADIUS clients

configure network access policies on the RADIUS server

Explanation:

Which computer can be used where there is no regular electricity?​

Answers

Answer:

A mechanical computer

Explanation:

Created from gears and levers

Plz help help help


What was the first electromechanical digital computer?

For your kind information I would like to tell you that don't search on internet because it will show ENIAC and that is not the answer the answeris may be ABC or MARK I. I am just confused, Please help me

Answers

Explanation:

For your kind information the answer of the question is MARK I.

Answer:

What was the first electromechanical digital computer?

=⟩ Mark I was the first electromechanical digital computer.

Hope it helpful to you

Abdullah wants to send sessitive data. Abdullah wants to make sure that only ahmed can see and read this. How can abdullah protect this data, so that ahmed can only access it. By using this information make an algorithm.

Answers

Answer:

Use an encryption algorithm

Explanation:

An encryption algorithm can be used to hide the message from parties in-between or any third parties that might want to intercept the message being sent by Abudullah to Ahmed.

Encryption algorithms use cryptographic methods to encrypt or code data such that only the sender and receiver of that data have the keys to properly decode/decrypt these messages/data.

monitor is hard copy output device??
false
true​

Answers

Answer:

false

Explanation:

monitor is an output device but not hard copy. Hard copy is paper

is computers takes lots of time to do any mathematical calculations.​

Answers

Answer:

I think the answer is a computer take lost of time to do any mathematical calculations because problem in the book or questions.

Hope this helps you ^^

Travis just got promoted to network administrator after the previous administrator left rather abruptly. There are three new hires that need onboarding with user accounts. When Travis looks at all the existing account names, he notices there is no common naming system. Where should he look to try to give the new hires user accounts with proper naming conventions

Answers

Answer:

The company's account policy

Explanation:

If there's no common naming system, It's best to go with the company's account policy.

8. Compare the advantages and disadvantages of using a smartphone rather than a laptop computer for creating a report.​

Answers

Answer: the advantage of using a smartphone rather than a laptop computer is that you can talk to people across the world, call people, make texts, and get easy access to the internet. but the disadvantages are that a lot of people stay inside their house because of phones, not getting enough exercise.

Explanation:

The advantages and disadvantages of using a smartphone rather than a laptop computer for creating a report. have been compared below.

The advantages of using a smartphone rather than a laptop computer are;

Portability; Smartphones are portable enough that they can fit into pockets and some purses and as such can be taken with you anywhere easily unlike a laptop computer that doesn't have such physical property.Cost; Smartphones are largely cheaper than the average laptop computer. Thus, cost is a good factor.

Disadvantages of using a smartphone rather than a laptop computer are;

Screen size; Smartphone screen size are always smaller than that of laptop computers .Software's; Smartphones can't run many of the type of powerful software's that can run on laptop computers.Data entry and user input; Due to the portability of smartphones, their keyboards are usually smaller than that of laptop desktops which makes data entry more difficult for those that have big fingers.

Read more about smartphones and laptops at; https://brainly.com/question/21283135

You are concerned about attacks directed at your network firewall. You want to be able to identify and be notified of any attacks. In addition, you want the system to take immediate action to stop or prevent the attack, if possible. Which tool should you use

Answers

Answer:

Intrusion Prevention System (IPS)

Explanation:

Firewall can be defined as a network security device that monitors incoming and outgoing network traffic and decides whether to allow or block specific traffic based on a defined set of security rules.

Simply stated, a firewall is a network security protocol that monitors and controls inbound and outbound traffic based on set aside security rules.

A firewall is used to control access to a computer or network, as it creates a barrier between a computer or a network and the internet in order to protect against unauthorized access.

Basically, it is a network security device or security system pre-installed on most computers to essentially inspect data being transmitted to or from a computer

Thus, the tool you should use is an intrusion prevention system (IPS).

Define Data communication​

Answers

Explanation:

Data transmission and data reception is the transfer and reception of data over a point-to-point or point-to-multipoint communication channel. Examples of such channels are copper wires, optical fibers, wireless communication channels, storage media and computer buses. 

are the exchange of data between two devices For data communications to occur, the communicating devices must be part of a communication system made up of a combination of hardware

What are the advantages of Radio waves over micro waves?​

Answers

Answer:

radio frequencies can penetrate deeply into the material and thus heat thick products. They heat more slowly than microwaves and thus make it possible to treat more delicate products which require a slower heating.

(e) Give the output of the following:
String n="Computer Knowledge";
String m = "Computer Applications";
System.out.println(n.substring(0,8).concat(m.substring(9)));​

Answers

Answer:

Computer Applications

true

Answer:

Computer Applications

Explanation:

true

PLEASE HELP DUE!!!
WILL GIVE BRAINLIEST!!

can someone help me please?

Answers

Answer:

see below picture

Explanation:

You can work your way through the formula from the inside out, mapping every operation to a gate.

who is the father of computer



Answers

Answer:

Charles Babbage is the father of computer

Explanation:

Charles Babbage is know as father of computer.

hope this help!

Write a program to input the TotalCost and display the Assured gift as per the following criteria TotalCost(TC) Assured Gift Less than or up to 2000 Wall Clock 32001 to 5000 School Bag 5001 to 10,000 Electric Iron More than 10,000 Wrist Watch​

Answers

Answer:

The program in Python is as follows:

TotalCost = int(input("Total cost: "))

if TotalCost <= 2000:

   print("Wall Clock")

elif TotalCost >= 2001 and TotalCost <= 5000:

   print("School Bag")

elif TotalCost >= 5001 and TotalCost <= 10000:

   print("Electric Iron")

else:

   print("Wrist Watch")

Explanation:

This gets input for total cost

TotalCost = int(input("Total cost: "))

If the total cost is up to 2000, print wall clock as the assured gift

if TotalCost <= 2000:

   print("Wall Clock")

If the total cost is between 2001 and 5000 (inclusive), print school bag as the assured gift

elif TotalCost >= 2001 and TotalCost <= 5000:

   print("School Bag")

If the total cost is between 5001 and 10000 (inclusive), print electric iron as the assured gift

elif TotalCost >= 5001 and TotalCost <= 10000:

   print("Electric Iron")

If the total cost is more than 10000, print wrist watch as the assured gift

else:

   print("Wrist Watch")

You notice a growing number of devices, such as environmental control systems and wearable devices, are connecting to your network. These devices, known as smart devices, are sending and receiving data via wireless network connections.
Which of the following labels applies to this growing ecosystem of smart devices?
A. The smartnet
B. Internet of smart devices
C. *Internet of things*
D. Dynamic environment

Answers

Answer:

*Internet of things*

Explanation:

A network with multiple physical smart devices are known as things on the network

what is a computer in daily life​

Answers

Answer:

The use of computers on a regular basis in our life is very important. Technically in daily life computer is used to convert raw facts and data into meaningful information and knowledge. Computer science is explored and challenged by humans daily. The computer is like an electronic magical device for our life.

Explanation:

Richard needs to copy information from another slide presentation that uses a different design template. To ensure that the information he is copying looks right, which option should he choose?

Answers

Answer:

Yes, you can copy the slides over into a presentation with master slide. Then, right-click each slide, and choose to apply an appropriate template from the master slide

(from vik7336: Hi, I'm not sure about my answer for your question. So I hope this might help)

When you evaluate the use of digital media, how has it affected the newspaper business? The rise of digital media has caused newspaper subscriptions to decline significantly because people are finding their news online. The rise of digital media has had no measurable effect on newspaper subscriptions. The rise of digital media has caused newspaper subscriptions to increase because it has inspired people to care more about news. The rise of digital media has caused newspaper subscriptions to fluctuate depending on the time of year.

Answers

Answer:

The rise of digital media has caused newspaper subscriptions to decline significantly because people are finding their news online.

It is A

Answer:

The rise of digital media has caused newspaper subscriptions to decline significantly because people are finding their news online.

Once the CPU has fetched the data requested, what are the next steps in the process?

A
execute, articulate

B
perform, execute

C
decode, analyze

D
decode, execute

MULTIPLE CHOICE

Answers

Answer:

D. decode execute

Explanation:

a program in matchine language is called​

Answers

Answer:

mcq

Explanation:

machine code is a computer program written in a machine code

Next, Sue decides to embed a chart from Microsoft Word. She copies and pastes data from a table that she has already created in a Word document. The table includes the results of her paper towel experiment. After reviewing her work, she realizes she needs to update one of the values.
How can she change that value so it is reflected in the chart in her presentation?
She can change the value in the original table in Word.
She can change the value directly on the chart in PowerPoint.
She can change the value using the Current Selection command group.
She can change the value in the mini- spreadsheet for the chart in PowerPoint.

Answers

Answer:

She can change the value in the mini- spreadsheet for the chart in PowerPoint.

Answer:

Answer is D

Explanation:

Other Questions
What is the missing reason in the proof? Given: ABC is a right angle, D B C is a straight angle Prove: ABC A B D A horizontal line has points D, B, C. A line extends vertically from point B to point A. Angle A B C is a right angle. definition of angle bisector segment addition property definition of congruent angles transitive property Cuales son los 5 hechos sobre el ncleo interno The Rybczynski theorem asserts that in a two-good world, and assuming that product prices stay constant, growth in the endowment of one factor of production, with the other factor unchanged, will lead to: A. An equal percentage increase in the output of both goods. B. An increase in the output of the good that uses the growing factor intensively and a decrease in the output of the other good. C. An increase in the output of both goods but a greater percentage increase in the output of the good that uses the growing factor intensively. D. An increase in the output of the good that uses the growing factor intensively and no change in the output of the other good. why water can reduce unpleasant smell that produce from methane gas ? Why wouldn't you use division to find an equivalent fraction for 7/15 Which short story uses the flashback as its main structure?A. GirlB. The House on Mango StreetC. An Occurrence at Owl Creek BridgeD. All of the above my science teacher said the moon is smaller than the earth change to indirect or reported speech A critical summary about music for my mother Combine these radicals.Anyone can help pls DOG ~?Complete the similarity statement and select the theorem that justifies your answer.**If they are not similar, select "none" for both parts . A ball of mass 0.50 kg is rolling across a table top with a speed of 5.0 m/s. When the ball reaches the edge of the table, it rolls down an incline onto the floor 1.0 meter below (without bouncing). What is the speed of the ball when it reaches the floor? who was the first prime minister of Germany EFGH is an isosceles trapezoid and EFGI is a parallelogram. If mIEF = 36, then mHGI = (Blank 1). What is socialzatoin ?How socialzation formation? justifiy the statement. Furthermore, obesity is affecting more people in the country. is an example ofA. Rhetorical questionB. Addition transitionC. Cause/effect transitionD. Concluding transition Help me plz 20 points to who ever gets it right the ratio of sadia's age to her father's age is 3:6. The sum of their age is 96 .What is sadia's age (e) Give the output of the following:String n="Computer Knowledge";String m = "Computer Applications";System.out.println(n.substring(0,8).concat(m.substring(9))); 5. The average weight of a blue whale is 4 x 105 pounds. The average weight of an elephant is 1 x 10 pounds. How many more times heavier is a blue whale than an elephant in pounds? Who votes in a direct democracy