Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Palace Place hotel rooms are identified by a four digit numberwxyz. The first two digitswxrepresent the floor. For example, room 2134 is on the

The Palace Place hotel rooms are identified by a four digit numberwxyz. The first two digitswxrepresent the floor. For example, room 2134 is on the 21stfloor. Room 0781 is on the 7thfloor. The last two digitsyzrepresent the type of room:

  • 00-19 Economy
  • 20-39 Economy with Drawing Room
  • 40-59 Two Bedroom Suite
  • 60-79 Two Bedroom Suite with Balcony
  • 80-99 Luxury Suite

You are to write a function method roomDetails(int roomNum) that takes a room number as an argument and returns a String of the floor and room type. For example, roomDetails(1877) will yield: "Floor 18 Two Bedroom Suite with Balcony"

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions

Question

Discuss the formation and operation of an LLC.

Answered: 1 week ago

Question

Explain the advantages of using an FLP to protect family assets.

Answered: 1 week ago