using class, poblic and privet ....... Michele is an American tourist. He is now in Jordan to visit Petra and he wants to go shopping, he has an amount of money from both currencies: Jordanian Dinar (JOD) and United States (US) dollar. For a given item with a specified price (p) in JOD, By using the class write a C++ program to help Mr. Michele to determine if he can buy the item or not. If the answer is "YES", then determine how many: US dollars he needs to pay if he hasn't enough JODs to buy the item, the remaining number of JODs, and the remaining number US dollars.     Assume the following: One JOD = 1.41 US dollar One US dollar = 0.71 JOD Input Format Three space-separated real values: US, JOD, and P, where : US: the number of US dollars held by Michele JOD: the number of Jordanian dinars held by Michele P: the item price in Jordanian Dinar    Output Format See the sample outputs for the required messages.  Sample #1 Input 10 5 30 Output Sorry , you haven't enough money to buy this item  Sample #2 Input 100 20 20 Output You have the exactly number of JODs to buy this item After buying this item you will have 0 JODs and 100 dollars  Sample #3 Input 200 50 30 Output You have enough JODs to buy this item After buying this item you will have 20 JODs and 200 dollars  Sample #4 Input 150 50 65 Output You haven't enough JODs to buy this item You need 21.15 dollars to buy this item After buying this item you will have 0 JODs and 128.85 dollars

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
using class, poblic and privet ....... Michele is an American tourist. He is now in Jordan to visit Petra and he wants to go shopping, he has an amount of money from both currencies: Jordanian Dinar (JOD) and United States (US) dollar. For a given item with a specified price (p) in JOD, By using the class write a C++ program to help Mr. Michele to determine if he can buy the item or not. If the answer is "YES", then determine how many: US dollars he needs to pay if he hasn't enough JODs to buy the item, the remaining number of JODs, and the remaining number US dollars.     Assume the following: One JOD = 1.41 US dollar One US dollar = 0.71 JOD Input Format Three space-separated real values: US, JOD, and P, where : US: the number of US dollars held by Michele JOD: the number of Jordanian dinars held by Michele P: the item price in Jordanian Dinar    Output Format See the sample outputs for the required messages.  Sample #1 Input 10 5 30 Output Sorry , you haven't enough money to buy this item  Sample #2 Input 100 20 20 Output You have the exactly number of JODs to buy this item After buying this item you will have 0 JODs and 100 dollars  Sample #3 Input 200 50 30 Output You have enough JODs to buy this item After buying this item you will have 20 JODs and 200 dollars  Sample #4 Input 150 50 65 Output You haven't enough JODs to buy this item You need 21.15 dollars to buy this item After buying this item you will have 0 JODs and 128.85 dollars
Expert Solution
steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY