Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Code In Java Please! Thank you! :) Question #1: Crypto Change Program (7pts) Write a program that determines the change to be given by

image text in transcribedimage text in transcribed

Please Code In Java Please! Thank you! :)

Question \#1: Crypto Change Program (7pts) Write a program that determines the change to be given by a 3rd millennium scalper selling tickets to a grimvalor game. In this question, you will use the crypto coins of the forthcoming millennium (year 20503000): Pesico, Bitom, Ditom, Zitom and Cryptom. A Pesico coin will be the largest denomination. 7500 Cryptom coins will be equivalent to 1 Pesico. 500 Cryptom coins will be equivalent to 1 Bitom. 200 Cryptom coins will be equivalent to 1 Ditom. 50 Cryptom coins will be equivalent to 1 Zitom. Assume that a ticket to the game costs between 1 Cryptom (Junior grimvalors) and 1 Pesico (Pro level), and the scalper only accepts a single Pesico coin to pay for the ticket. When calculating the change to return, always maximize larger denominations; for example, if 800 Cryptom need to be returned, you should return 1 Bitom, 1 Ditom, and 2 Zitom, as opposed to 16 Zitom or even 800 Cryptom. 1. Write an algorithm for the Crypto Change Program. 2. Name of the class/program =A1 Q Q1. 3. Display a welcome/salutation message to the user of the program. 4. Display a prompt message for the user to enter the price of the ticket in Cryptom. Kindly note that we assume that the user enters a valid price (i.e. price should not exceed 7500 ). You do not need to write any statements to check for the validity of the entered price. The following are samples of screenshots to illustrate the expected behavior of your program. Your program must display the same information with the same format and should work for any valid user entered data. Welcome to the Crypto Change Program: t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t+t Enter the price of the ticket in Cryptom (at most 7500 ): 1400 You bought a ticket for 1400 cryptom. and gave me a pesico, so your change is 12 Bitom, 0 Ditom, 2 zitom, and 0 cryptom. Thank you for using my bespoke Crypto Change Program! Enjoy the Game! Figure 1: Sample1 output of Question1. Welcome to the Crypto Change Program: Enter the price of the ticket in Cryptom(at most 7500): 770 You bought a ticket for 870 cryptom, and gave me a Desico, so your change is 13 Bitom, 0 Ditom, 2 zitom, and 30 cryptom. Thank you for using my bespoke Crypto Change Program! Enjoy the Game

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Main Memory Database Systems

Authors: Frans Faerber, Alfons Kemper, Per-Åke Alfons

1st Edition

1680833243, 978-1680833249

More Books

Students also viewed these Databases questions

Question

Define Decision making

Answered: 1 week ago

Question

What are the major social responsibilities of business managers ?

Answered: 1 week ago

Question

What are the skills of management ?

Answered: 1 week ago