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
liraira [26]
3 years ago
7

Assume the existence of a Building class with a constructor that accepts two parameters: a reference to an Address object repres

enting the building's address, and an integer for the square footage of the building. Assume a subclass ApartmentBuilding has been defined with a single integer instance variable, totalUnits. Write a constructor for ApartmentBuilding that accepts three parameters: an Address and an integer to be passed up to the Building constructor, and an integer used to initialize the totalUnits instance variable.
public ApartmentBuilding(Address address, int squareFootage, int totalUnits) {
super(address, squareFootage);
this.totalUnits = totalUnits;
}
Computers and Technology
2 answers:
NikAS [45]3 years ago
3 0

Answer:

public ApartmentBuilding(Address address, int squareFootage, int totalUnits) {

super(address, squareFootage);

this.totalUnits = totalUnits;

}

katovenus [111]3 years ago
3 0

Answer:

It seems you already answered your own question, but let me explain the steps so that it will all be clear for you.

Explanation:

A constructor has no return type, has the name as the class name, and can take parameters.

According to the requirements, the <em>ApartmentBuilding</em> constructor takes three parameters: address, squareFootage, and totalUnits. Inside the body of the constructor, we need to initialize these variables.

Be aware that the address and squareFootage is initialized by using super keyword. That means, the constructor of the parent class - <em>Building</em>  is invoked.

You might be interested in
Simplify the expresion<br>12. 12g + 9g​
Lerok [7]
12g + 9g simplified is 21g
7 0
3 years ago
What will be displayed in the console when this program runs?
Novay_Z [31]

Answer:

20 will be displayed on the console.

Explanation:

Given code is:

var numList = [10,20,30];

console.log(numList[numlist.length-2]);

The first line of code declares an array named numList and assigns it values given in the square brackets.

The second line of code is written to display the element on the index obtained by [numlist.length-2]

[numlist.length-2] means the second index.

Hence,

after running the code on JavaScript editor and dry running the code

20 will be displayed on the console.

7 0
3 years ago
Read 2 more answers
Production cost can be reduced using technology. Explain
Black_prince [1.1K]

Explanation:

By reducing the time the use on unnecessary tasks. And you would be able to operate on using your time on beneficial tasks

3 0
3 years ago
At which stage should James, a website designer, gather information about the website he wants to create, and at which stage sho
viva [34]
<h2>Answer: James should gather information in the <u><em>Learning</em></u> phase and begin the site’s coding in the <u><em>Development</em></u> phase.</h2>

8 0
3 years ago
How would you use SQL to change a table's structure? What general types of changes are possible? Which commands are used to impl
xz_007 [3.2K]

The SQL is used to change a table's structure by:

The use of the SQL ALTER TABLE command.

<h3>How is it done?</h3>

The SQL ALTER TABLE command is known to  be that which is often used to alter the structure of an existing table.

It is known to help one to be able to add or delete columns, make or destroy indexes, alter the kinds of existing columns, rename columns or the table itself.

Note that  It can also be used to alter the comment for any kind of table and type of the table therein.

Learn more about SQL from

brainly.com/question/25694408

#SPJ1

4 0
2 years ago
Other questions:
  • Row array gameScores contains all player scores. Construct a row array highScores than contains all player scores greater than m
    15·1 answer
  • Ben assembled parts of a computer and created a fully functional desktop PC. He wants the computer to connect to the Internet. W
    10·1 answer
  • To add text to a blank slide layout, _____.
    8·2 answers
  • An employee who interacts with customers regarding the nature of their car problems, rather than actually working on the vehicle
    12·2 answers
  • Binary is best interpreted by a computer because?
    8·2 answers
  • You want to deploy a software package that's available to all users in the domain if they want to use it, but you don't want the
    7·1 answer
  • Is the following statement true or false?
    12·1 answer
  • Which two statements are true about algorithms?
    15·2 answers
  • We can create tables in MS. Word from *<br> 2 points<br> Insert Tab<br> Home Tab<br> Mailings Tab
    5·2 answers
  • WILL GIVE BRAINLIEST! 20 POINTS! PLZ HELP!
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!