A parking garage has two types of customers: members and non-members. During week working days, Sunday to Thursday, members use the parking for free and non-members pay BD 0.300 per hour. However, during the weekend, Friday and Saturday, all type of customers pay BD 0.200 per hour. Write a Java program that prompts the user to enter a day (int) followed by the number of parking hours double) and a member code (char) 'M' or 'm' for members and any other character for non-menmbers. Your program should then calculate and print the total charges. For the days, use 1 for Sunday, 2 for Monday, etc. Note: For any invalid day or hours print an appropriate invalid message and exit the program. Sample Run 1 Sample Run 2 Sample Run 3 Enter day, hours and member code: 6 4.5 M Enter day, hours and member code; 2 5.0 M Enter day, hors and member code: 3 5.25 N Total charges: BD 0,900 Total charges: BD 0.000 Tolal charges: BD 1575
A parking garage has two types of customers: members and non-members. During week working days, Sunday to Thursday, members use the parking for free and non-members pay BD 0.300 per hour. However, during the weekend, Friday and Saturday, all type of customers pay BD 0.200 per hour. Write a Java program that prompts the user to enter a day (int) followed by the number of parking hours double) and a member code (char) 'M' or 'm' for members and any other character for non-menmbers. Your program should then calculate and print the total charges. For the days, use 1 for Sunday, 2 for Monday, etc. Note: For any invalid day or hours print an appropriate invalid message and exit the program. Sample Run 1 Sample Run 2 Sample Run 3 Enter day, hours and member code: 6 4.5 M Enter day, hours and member code; 2 5.0 M Enter day, hors and member code: 3 5.25 N Total charges: BD 0,900 Total charges: BD 0.000 Tolal charges: BD 1575
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
Topic Video
Question
Java 1
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 3 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
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