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!!
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!!
Chapter2: Using Data
Section: Chapter Questions
Problem 12PE
Related questions
Concept explainers
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Question
java if statement
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 3 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
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT