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
Mademuasel [1]
3 years ago
9

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.
Computers and Technology
1 answer:
kolbaska11 [484]3 years ago
8 0

Answer:

public ApartmentBuilding (Address addr, int sqFoo, int totUn) {

  super(addr, sqFoo);

  this. totalUnits = totUn;

}

Explanation:

To pass up parameters from a subclass constructor to a superclass constructor you just need to define a parameter name in the subclass constructor (in this case addr and sqFoo, but it can be anything you like) and then use the keyword super.

The keyword super acts exactly the same as the constructor of the superclass, however that may be defined.

And for the rest of the parameters (E.G. the ones of the sub class) you just treat them as a regular constructor.

You might be interested in
Sino ang pinaka matalino sa math sa buong mundo​
Svetllana [295]

Answer:

lahat ng tao ay matalino kasama ka na dun kaya lang di natin ito inilalabas dahil natatamad tayo

6 0
3 years ago
Read 2 more answers
What are your initial thoughts regarding copyright and fair use after watching the clip?
Elanso [62]
The answer is A you’re welcome
5 0
3 years ago
1. What is wrong with the following code?
uranmaximum [27]

Answer:

Aye dog I don't know nothing about code, yes its true, but I hope that you get an answer for you!

Explanation:

Facts...

5 0
3 years ago
Explain Importance of flowchart in computer programming
zhuklara [117]

Answer:

Flow charts help programmers develop the most efficient coding because they can clearly see where the data is going to end up. Flow charts help programmers figure out where a potential problem area is and helps them with debugging or cleaning up code that is not working.

creds to study.com (please don't copy it work by word, make sure to paraphrase it. otherwise plagiarism is in the game.)

Explanation:

7 0
3 years ago
A(n) ________ software installation enables you to decide which features you want to install on the hard drive
Mazyrski [523]
<span>An element in the Excel window that displays the value or formula contained ... which you can specify the type of calculation you want to perform in an Excel formula are: ..... installs all the most commonly used files to your computer's hard drive. Full. A(n) ______ software installation enables you to decide which features you ...</span><span>
</span>
5 0
4 years ago
Other questions:
  • Nadia would like to find text in her current document that differentiates CompanyABC from companyabc. Which option should she us
    8·2 answers
  • What are some good editing software apps for pc?
    11·1 answer
  • Bitnet, one of the predecessors of the internet was launched in 1981. what does bitnet stand for?
    12·1 answer
  • Which of the following events would most likely produce an earthquake
    10·1 answer
  • "Consideration of being digitally" literate Means to produce digital technology Participate in digital activities none of the ch
    11·1 answer
  • What is one of the benefits of using templates for your email marketing campaigns?
    10·1 answer
  • A technician receives an invalid certificate error when visiting a website with port 443 enabled. Other computers on the same LA
    8·1 answer
  • Create a do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop shou
    5·1 answer
  • Assume an ArrayList and a Linked List each contain 10,000 items. Which operation is performed fastest
    14·1 answer
  • Please its argent and I will give you BRAINLIEST ANSWER 6. How would you confirm that a colourless liquid given to you is pure w
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!