Question: Code in Java: please explain in details Program Requirements: Design a program that asks the user for a street number, type, and direction ( e
Code in Java: please explain in details
Program Requirements:
Design a program that asks the user for a street number, type, and direction eg "North th Street"
Your program should then tell the user:
How many blocks east or west the street is from Central Avenue.
Whether the street is north or south of Washington Street.
The name of the preceding Avenue or Street closer to Central Avenue considering both direction and number.
Test the program to ensure it works correctly. The following examples can serve as a guide for the testing of the code.
Examples:
Input:
Direction: North
Street number:
Street type: Avenue
Output:
o North th Avenue is blocks east of Central Avenue and is north of Washington Street.
o The preceding Avenue is North th Avenue.
Input:
o Direction: South
Street number:
Street type: Street
Output:
South th Street is blocks west of Central Avenue and is south of Washington Street.
The preceding Street is South rd Street.
Input:
o Direction: North
Street number:
Street type: Lane
Output:
North th Lane is blocks west of Central Avenue and is north of Washington Street.
The preceding Avenue is North th Avenue.
Input:
o Direction: South
Street number:
Street type: Way
Output:
o South th Way is blocks east of Central Avenue and is south of Washington Street.
The preceding Street is South th Street.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
