A console (text-based) program that allows the user (when asked) to enter these three pieces of information: The name of their favorite restaurant (text) The location of the restaurant (city, neighborhood, or street) (text) The number of times they typically eat at a restaurant each month (a number) Before the user can input this information, they must be given instructions on screen. Each of the above inputs requires a prompt, as follows: "Please enter the name of your favorite restaurant:" "Please enter the location of the restaurant: (City, neighborhood, or street.)" "Please enter the number of times you typically eat at the restaurant each month. (Numbers only.)" Each input from the user must be stored in its own variable with an appropriate data type (indicated in parentheses above). The name of each variable must provide a hint at what information it contains. For example, you might call the variable that stores the first input (their favorite restaurant) "favrest", “restfav”, or even just "restaurant". Immediately after each input, the program must thank the user for entering their information and repeat back (on screen) whatever the user entered. If the user entered “McDonald’s” for their favorite restaurant, before proceeding to the next prompt the program must respond like this, “Thank you! You entered: McDonald’s.” In addition to the above, if the user enters 10 or more as the number of times they eat at a restaurant each month (the final input), the program must say the following: “Big spender!” If the user enters a number below 10, then the program must respond: "Penny pincher!". When all the above steps have been completed, the program must terminate (end). Your program must be fully documented with Code Comments. This includes variable declarations, input and output lines, and conditional logic (IF/ELSE). You don’t have to explain how each command works, but you do have to briefly explain what’s happening at each step. Your comments must be sufficient to explain how the program works to another programmer who is familiar with Java but has not seen this program before. When you are finished, run the program in Develop mode and use the input box below to test the program with various inputs that a user might use. Put each input on a separate line – enter the first value, then hit the Return key, then enter the second value on the next line, etc. Fav Rest: McDonald’s Address : Miami Number of time: 24
A console (text-based) program that allows the user (when asked) to enter these three pieces of information: The name of their favorite restaurant (text) The location of the restaurant (city, neighborhood, or street) (text) The number of times they typically eat at a restaurant each month (a number) Before the user can input this information, they must be given instructions on screen. Each of the above inputs requires a prompt, as follows: "Please enter the name of your favorite restaurant:" "Please enter the location of the restaurant: (City, neighborhood, or street.)" "Please enter the number of times you typically eat at the restaurant each month. (Numbers only.)" Each input from the user must be stored in its own variable with an appropriate data type (indicated in parentheses above). The name of each variable must provide a hint at what information it contains. For example, you might call the variable that stores the first input (their favorite restaurant) "favrest", “restfav”, or even just "restaurant". Immediately after each input, the program must thank the user for entering their information and repeat back (on screen) whatever the user entered. If the user entered “McDonald’s” for their favorite restaurant, before proceeding to the next prompt the program must respond like this, “Thank you! You entered: McDonald’s.” In addition to the above, if the user enters 10 or more as the number of times they eat at a restaurant each month (the final input), the program must say the following: “Big spender!” If the user enters a number below 10, then the program must respond: "Penny pincher!". When all the above steps have been completed, the program must terminate (end). Your program must be fully documented with Code Comments. This includes variable declarations, input and output lines, and conditional logic (IF/ELSE). You don’t have to explain how each command works, but you do have to briefly explain what’s happening at each step. Your comments must be sufficient to explain how the program works to another programmer who is familiar with Java but has not seen this program before. When you are finished, run the program in Develop mode and use the input box below to test the program with various inputs that a user might use. Put each input on a separate line – enter the first value, then hit the Return key, then enter the second value on the next line, etc. Fav Rest: McDonald’s Address : Miami Number of time: 24
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
- A console (text-based)
program that allows the user (when asked) to enter these three pieces of information:- The name of their favorite restaurant (text)
- The location of the restaurant (city, neighborhood, or street) (text)
- The number of times they typically eat at a restaurant each month (a number)
- Before the user can input this information, they must be given instructions on screen. Each of the above inputs requires a prompt, as follows:
- "Please enter the name of your favorite restaurant:"
- "Please enter the location of the restaurant: (City, neighborhood, or street.)"
- "Please enter the number of times you typically eat at the restaurant each month. (Numbers only.)"
- Each input from the user must be stored in its own variable with an appropriate data type (indicated in parentheses above). The name of each variable must provide a hint at what information it contains. For example, you might call the variable that stores the first input (their favorite restaurant) "favrest", “restfav”, or even just "restaurant".
- Immediately after each input, the program must thank the user for entering their information and repeat back (on screen) whatever the user entered. If the user entered “McDonald’s” for their favorite restaurant, before proceeding to the next prompt the program must respond like this, “Thank you! You entered: McDonald’s.”
- In addition to the above, if the user enters 10 or more as the number of times they eat at a restaurant each month (the final input), the program must say the following: “Big spender!” If the user enters a number below 10, then the program must respond: "Penny pincher!".
- When all the above steps have been completed, the program must terminate (end).
- Your program must be fully documented with Code Comments. This includes variable declarations, input and output lines, and conditional logic (IF/ELSE). You don’t have to explain how each command works, but you do have to briefly explain what’s happening at each step. Your comments must be sufficient to explain how the program works to another programmer who is familiar with Java but has not seen this program before.
When you are finished, run the program in Develop mode and use the input box below to test the program with various inputs that a user might use. Put each input on a separate line – enter the first value, then hit the Return key, then enter the second value on the next line, etc.
Fav Rest: McDonald’s
Address : Miami
Number of time: 24
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
Knowledge Booster
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.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education