Purchase Solution

Creation of Java Hotel Class

Not what you're looking for?

Ask Custom Question

Creat a class named HotelRoom that includes an interger field for the room number and a double field for the nightly rental rate. Include get methods for these fields and constructor that requires an interger argument representing the room number. The constructor set s the room rate based on the room number; roooms numbered 299 and below are $69.95 per night, and others are $89.95 per night. SAve as HotelRoom.java

Create and extened class named Suite whose constructor requires a room number and adds a $40 surcharge to the regular hotel room rated, which is based on the room number. Sace as Suite.java

Write an application named Use HotelRoom that creates an object of each class, and demonstrates all the methods work correctly. Save as UseHotelRoom.java

Purchase this Solution

Solution Summary

The expert creates a java hotel class which includes an integer field for the room number and a double field.

Purchase this Solution


Free BrainMass Quizzes
Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Javscript Basics

Quiz on basics of javascript programming language.

C# variables and classes

This quiz contains questions about C# classes and variables.

Basic Networking Questions

This quiz consists of some basic networking questions.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.