Write a pseudocode for the scenario below Congrats! You work for Zillow now. Your first task is to write an algorithm that recommends apartments based on a user’s preferences. Zillow offers the following three properties for rent: Apartment A – 600 square feet, pets allowed, $1400/month Apartment B – 800 square feet, no pets, $1600/month Apartment C – 1000 square feet, pets allowed, $1800/month Write an algorithm for a program that does the following: Prompt the user for the minimum square footage they will accept, how many pets they have, and the maximum price they’d pay per month, and then calculate and output the apartments that match their preferences. If there is no apartment that matches their preferences, print out "No matches, sorry!". Make sure the inputs are valid--negative square footages, prices, and pet numbers don’t make sense!

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter5: Making Decisions
Section: Chapter Questions
Problem 4PE
icon
Related questions
Question

Write a pseudocode for the scenario below

Congrats! You work for Zillow now. Your first task is to write an algorithm that recommends apartments based on a user’s preferences. Zillow offers the following three properties for rent:

  1. Apartment A – 600 square feet, pets allowed, $1400/month
  2. Apartment B – 800 square feet, no pets, $1600/month
  3. Apartment C – 1000 square feet, pets allowed, $1800/month

Write an algorithm for a program that does the following: Prompt the user for the minimum square footage they will accept, how many pets they have, and the maximum price they’d pay per month, and then calculate and output the apartments that match their preferences. If there is no apartment that matches their preferences, print out "No matches, sorry!". Make sure the inputs are valid--negative square footages, prices, and pet numbers don’t make sense!

--- Sample run ---:

What is the minimum square footage you’d like? 800 How many pets do you have? 1 What is the maximum monthly rent you’d pay? 2000 You’d love Apartment C!
 
List at least four input scenarios to test your solution for 3a.
Congrats! You work for Zillow now. Your first task is to write an algorithm that recommends apartments based on a user's preferences.
Zillow offers the following three properties for rent:
1. Apartment A - 600 square feet, pets allowed, $1400/month
2. Apartment B - 800 square feet, no pets, $1600/month
3. Apartment C - 1000 square feet, pets allowed, $1800/month
Write an algorithm for a program that does the following: Prompt the user for the minimum square footage they will accept, how many pets
they have, and the maximum price they'd pay per month, and then calculate and output the apartments that match their preferences. If
there is no apartment that matches their preferences, print out "No matches, sorry!". Make sure the inputs are valid--negative square
footages, prices, and pet numbers don't make sense!
Sample run ---:
What is the minimum square footage you'd like?
800
How many pets do you have?
1
What is the maximum monthly rent you'd pay?
2000
You'd love Apartment C!
Transcribed Image Text:Congrats! You work for Zillow now. Your first task is to write an algorithm that recommends apartments based on a user's preferences. Zillow offers the following three properties for rent: 1. Apartment A - 600 square feet, pets allowed, $1400/month 2. Apartment B - 800 square feet, no pets, $1600/month 3. Apartment C - 1000 square feet, pets allowed, $1800/month Write an algorithm for a program that does the following: Prompt the user for the minimum square footage they will accept, how many pets they have, and the maximum price they'd pay per month, and then calculate and output the apartments that match their preferences. If there is no apartment that matches their preferences, print out "No matches, sorry!". Make sure the inputs are valid--negative square footages, prices, and pet numbers don't make sense! Sample run ---: What is the minimum square footage you'd like? 800 How many pets do you have? 1 What is the maximum monthly rent you'd pay? 2000 You'd love Apartment C!
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,