Question: ABC department store offers a prize if the person's purchases exceed 150 dinars. The prize will b based on age range. Write a java program that reads a purchase and an age. The program should d proper message based on the amount purchased and the age range according to the table below: Note: if the purchases amount is less than 150, then display a message "Sorry, you didn't win" Age Between 14 and 25 Prize received Cell phone Between 26 and 40 Voucher with 40 BD Coffee machine Microwave machine Between 41 and 55 55 and above Sample I/O: Enter purchases amount: 200 Enter Age: 45 Congratulations, you won a Coffee machine!!

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 12PE
icon
Related questions
Question

java if statement

 

Question:
ABC department store offers a prize if the person's purchases exceed 150 dinars. The prize will b
based on age range. Write a java program that reads a purchase and an age. The program should d
proper message based on the amount purchased and the age range according to the table below:
Note: if the purchases amount is less than 150, then display a message "Sorry, you didn't win"
Age
Prize received
Cell phone
Voucher with 40 BD
Between 14 and 25
Between 26 and 40
Between 41 and 55
55 and above
Coffee machine
Microwave machine
Sample I/O:
Enter purchases amount: 200
Enter Age: 45
Congratulations, you won a Coffee machine!!
Transcribed Image Text:Question: ABC department store offers a prize if the person's purchases exceed 150 dinars. The prize will b based on age range. Write a java program that reads a purchase and an age. The program should d proper message based on the amount purchased and the age range according to the table below: Note: if the purchases amount is less than 150, then display a message "Sorry, you didn't win" Age Prize received Cell phone Voucher with 40 BD Between 14 and 25 Between 26 and 40 Between 41 and 55 55 and above Coffee machine Microwave machine Sample I/O: Enter purchases amount: 200 Enter Age: 45 Congratulations, you won a Coffee machine!!
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Mathematical functions
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT