Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In some Asian countries, the number 14 is considered unlucky. Some building owners play it safe and skip both the 13th and the 14th floor

In some Asian countries, the number 14 is considered unlucky. Some building owners play it safe and skip both the 13th and the 14th floor in their numbering (i.e., the physical 13th & 14th floors are renamed the 15th & 16th floors).

Write an algorithm and create a flow chart for an elevator that takes users to their regular floors unless it is the 13th or 14th floor. In that case, take them to the 15th floor.

Now write your Java code method based on your flow chart

Should take the requested floor as a parameter

Should return the actual physical floor the elevator stops at

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

Conceptual Database Design An Entity Relationship Approach

Authors: Carol Batini, Stefano Ceri, Shamkant B. Navathe

1st Edition

0805302441, 978-0805302448

More Books

Students also viewed these Databases questions

Question

Write an elaborate note on marketing environment.

Answered: 1 week ago