Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You can use any programming language whatever you like (Java, C, C++).. Kuru : Penny, Lira : Currency Consider the following program description: Write a

You can use any programming language whatever you like (Java, C, C++)..

Kuru : Penny, Lira : Currency

image text in transcribed

Consider the following program description: "Write a program that determines the change to be dispensed from a vending machine. An item in the machine can cost between 50 kurus and 2 liras, in 25 kurus increments (50, 75, 100,..., 150, 175, 200), and the machine only accepts one lira coins to pay for the item. The machine accepts a maximum of 2 one lira coins. The change should be in as less coins as possible using 1 lira, 50 and 25 kurus coins. For instance, a possible dialogue with the user might be: Enter the price of the item in kurus: 125 Enter the number of 1 lira coins you have inserted into the machine: 2 You bought an item for 125 kurus and gave me 2 liras, so your change is Kurus Penny Lira Currency 0 1 lira 1*50 kurus 1*25 kurus Display the change only if a valid price or a valid number of coins is entered (no less than 50 kurus, no more than 200 kurus, an integer multiple of 25 kurus, and inserted 1 or 2 one lira coins). Otherwise display a separate error message for any of the following invalid inputs: a cost under 50 kurus a cost more than 200 kurus a cost that is not a multiple of 25 kurus less than one 1 lira coin more than 2 lira coins For the above description: 1. Develop a program using a language of your choice 2. Derive equivalence classes. 3. Apply boundary values analysis. 4. Generate test cases. 5. Implement unit tests for the test cases you have generated in step 4 Submit 1. A report of the equivalence classes you have derived, boundary value analysis and test cases (input and the expected output) with an explanation of how you have derived them 2. Source code (both the program and the unit tests) 3. A screenshot showing that all of your tests are successful

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_2

Step: 3

blur-text-image_3

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

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions

Question

1. Identify what positions are included in the plan.

Answered: 1 week ago

Question

2. Identify the employees who are included in the plan.

Answered: 1 week ago

Question

7. Discuss the implications of a skill-based pay plan for training.

Answered: 1 week ago