Write a class classroom that extends room

Assignment Help Computer Engineering
Reference no: EM132217515

The zip file LabInheritStarter contains the code skeleton for this lab. Write a class Room.

A Room class contains an int instance variable for the area (in square feet) of the room one constructor that takes the area of the room as a parameter an accessor, int getSquareFeet() that returns the area of the room an accessor, int getCapacity() that returns the capacity of the room.

The capacity is given by dividing the square feet by 9 (using integer division). an accessor, String toString() that returns the square feet and capacity of the room.

Write a class Classroom that extends Room.

A Classroom class contains an int instance variable for the number of chairs in the classroom a constructor that takes the area of the classroom as a parameter a constructor that takes the area of the classroom and the number of chairs as parameters getter and setter for chairs an override for getCapacity.

The capacity of a classroom is the number of chairs. an accessor, String toString() that returns the square feet and capacity of the room as well as the number of chairs. Write a class Elevator that extends Room.

An Elevator class contains an int instance variable for the current floor of the elevator a constructor that takes the area of the elevator as a parameter a mutator void up(int floors) that increases the current floor by the parameter a mutator void down(int floors) that decreases the current floor by the parameter an accessor String toString() that returns the square feet and capacity of the elevator, as well as its current floor.

Reference no: EM132217515

Questions Cloud

Prepare the adjusting entries for the items : The unadjusted trial balance for Sierra Corp. is shown in Illustration 4-4. Instead of the adjusting entries shown in the text at October 31.
Determine the total cost and the average cost per mile : The cost per mile for a rented vehicle is $1.25 for the first 100 miles, $0.75 for the next 200 miles, and $0.70 for all miles in excess of 300 miles.
Determine the median of this set of 2n values : Determine the median of this set of 2n values, which we will define here to be the nth smallest value.
Create two use cases for the school bus system : The X School operates 40 buses that serve approximately 1,000 students in grades K-12. The bus operation involves 30 regular routes, plus special routes.
Write a class classroom that extends room : A Room class contains an int instance variable for the area (in square feet) of the room one constructor that takes the area of the room.
Design an algorithm for an xml document : An XML document is a plain text file containing opening and closing tags that semantically mark-up pieces of data. Further, tags can be nested as many levels.
Write a proram to take a sequence of numbers from the stack : Write a program to take a sequence of numbers from the stack. The most recent stack value will contain the number of digits to use.
Creates an object of type pocket to be used : How wTakes in a coin name as part of the constructor and stores it in a private string Has a method that returns the coins name Has an abstract getvalue method
What is wrong with the given variable declarations : What is wrong with the following variable declarations? If wrong, explain. If correct (nothing wrong), write "correct". double 1st_var = 10; int var2.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Determine the output technology

Describe a scenario in which the distribution of users determine the output technology.

  Describe the behavior of the data

Methods are the members of a class that describe the behavior of the data. The Main( ) method is required for both console and Windows applications.

  List differences between linked list and array structure

List three differences between Linked List structure and Array structure? Include the differences of How we add/remove elements in each.

  Describe how concepts such as risc evolved over past years

Describe how concepts such as RISC, pipelining, cache memory, and virtual memory have evolved over the past 25 years to improve system performance.

  Assume the javascript variables greeting

Write down a line of code to replace line 3 above which will create a greeting 'Hello Earthling!' with a space in between 'Hello' and 'Earthling' and an exclamation mark at the end.

  Body language conveys non-verbal cues to the recipient of

body language conveys nonverbal cues to the recipient of any given communication. explain the five nonverbal methods of

  3d animation using in object modelling and methods

Ngaruwahia Golf Course sits on the banks of the mighty Waikato River. This club is an easy 10 minutes' drive north of Hamilton and an hour's drive south of central Auckland along State Highway1.

  Evaluate a 2d game for pc

There are thousand of games on the web. Use Google to search for games for all platforms and come up with an idea and a title that fully reflects the main theme of your game

  Explain why the java dynamic dispatch algorithm

Explain why the Java dynamic dispatch algorithm, which looks for the method to invoke for a call o.a(), will never get into an infinite loop.

  Represent the sentences by predicate calculus

A swimmer is an athlete. Any athlete, who participatedin the 2016 Summer Olympics and won a gold medal, was joyful.

  How to create a checking account balance code

compute the balance by adding deposits and subtracting service charges and checks. Include buttons for calculate, Clear, Print, and Exit. Please put comments in the code.

  Create a monthly weekly daily log

Create a Monthly/Weekly/Daily log. Analyze it according to the importance of the activities listed. Suggest ways to reduce time on the unimportant activities in favor of the more important ones

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd