![DessAnnette2751](/avatars/35081.jpg)
DessAnnette2751
05.05.2021 •
Computers and Technology
A large hotel needs a program to store information about rooms at the hotel. Each of the rooms will be represented by an object which will store the number of beds in the room, and whether the room has a bath. Some rooms at the hotel are suites, in which case in addition to the information above they also need to store the number of sub-rooms in the suite. Which of the following is the best object-oriented program design?
a. Create a Suite class with the instance variables int numBeds, boolean hasBath, and int numSubrooms .Create a subclass Room of Suite which wil inherit the instance variables numBeds and hasBath from Room, but not the instance variable int numSubrooms
b. Create a Room class with the instance variables int numBeds, and boolean hasBath. Create a subclass Suite of Room which will inherit the Instance variables of Room and has an additional instance variable int numSubrooms.
c. Create each of the following as separate classes, Room. Beds, Bath, Suite, SubRoom Create a single Roomor Suite class with the instance variables int numBeds, boolean hasBath, and int numSubrooms.
d. Create a Room class with the instance variables int numBeds, and boolean hasBath. Create a separate class Suite with the instance variable int numSubrooms
Solved
Show answers
More tips
- F Food and Cooking Ginger: A Universal Ingredient for Various Dishes...
- A Auto and Moto Which alarm system to choose?...
- C Computers and Internet Porn Banner: What It Is and How to Get Rid Of It?...
- F Food and Cooking How many stages of coffee roasting are there?...
- F Food and Cooking From Latte to Espresso: Which Coffee Drink is the Most Popular on Earth?...
- F Food and Cooking Experts Name Top 5 Healthiest Teas...
- C Computers and Internet Google Search Tips and Tricks: Everything You Need to Know...
- H Health and Medicine Discover the Hidden Principles and Real Results of the Japanese Diet...
- H Health and Medicine Liver Cleansing - Rejuvenation for the Body?...
- S Style and Beauty Is Photoepilation the Solution to Unwanted Hair Forever?...
Answers on questions: Computers and Technology
- C Computers and Technology Using a computer application is known as...
- C Chemistry What is a molarity of a solution in 9.8 moles of sodium chloride nacl is dissolved in water to a final volume 3.2 l...
- S Spanish El subjuntivo se usa para expresar emociones hechos seguridad detalles someone...
- E English Which choice matches the rhyme scheme of this stanza from the walrus and the carpenter ? the walrus and the carpenter were walking close at hand; they wept like anything...
- M Mathematics What can you conclude if you know m ∠ p + m ∠ q = m ∠ r + m ∠ q? a. m ∠ p = m ∠ q b. m ∠ p = m ∠ r c. m ∠ q = m ∠ r d. ∠ p and ∠ r are supplementary....
- M Mathematics Your boss gives you this information. pay per hour £7.20 hours in a shift 7.5hr number of shifts a week 5 how much money will you earn in a week? show your working earning...
- S Social Studies Which of these does not describe the 1970s a) foreign competition in consumer goods industries b) investment rate growth c) high inflation rate with slow growth d) economic...
- G Geography Prairie and steppe are which type of biome? a. tundra b. desert c. savanna d. grassland...
- C Chemistry For the oxidation of glucose (c6h12o6 + 6o2 -- 6h20 + 6co2), how many grams of oxygen gas will be consumed when 950g of glucose is oxidized completely?...
- E English Me come up with a 100 word poem about louisiana plz me and it have to make since i want to past to the next grade...
Ответ:
=tan (π-π/6)
=(tan π-tan (π/6))/(1+tan π tan π/6)
=-tan (π/6)
=-1/√3
=-√3/3
Hence the answer is: -√3/3