Question: 10.12 Ch 10 Program: Vending Machine I (Java) Programming Assignment: Vending Machine l Assigned:11/03/2017 Due: 11/13/2017 Objectives The objectives of this homework assignment: 1. Understand





10.12 Ch 10 Program: Vending Machine I (Java) Programming Assignment: Vending Machine l Assigned:11/03/2017 Due: 11/13/2017 Objectives The objectives of this homework assignment: 1. Understand the concept of object-oriented programming 2. Understand the concepts of "basic" class and "application/tester class. a. How one class uses another class elegantly! 3. Understand the concepts of object instantiation. 4. Familiarize with methods a. How to use the results of one method in another method 5. Master the use of exception handling for data format and range checking 6. Master code documentation, compilation, and execution 7. Expose to Java syntax, programming styles, and a Java classes. Problem Description Write a program that mimics the operations of several vending machines. More specifically, the program simulates what happens when the user chooses one of the vending machines, inputs money and picks an item from the vending machine. Assume there are two vending machines: one for drinks and one for snacks. Each vending machine contains several items. The name, price, and quantity of each item is given in two text files, one named "drinks.txt for the drinks vending machine and the other named "snacks.txt for the snacks vending machine. The format of the input values is comma-separated. The items listed should be organized in the file with the following order name, price, quantity. Here are some example items: Milk, 2.00,1 OJ,2.50,6 10.12 Ch 10 Program: Vending Machine I (Java) Programming Assignment: Vending Machine l Assigned:11/03/2017 Due: 11/13/2017 Objectives The objectives of this homework assignment: 1. Understand the concept of object-oriented programming 2. Understand the concepts of "basic" class and "application/tester class. a. How one class uses another class elegantly! 3. Understand the concepts of object instantiation. 4. Familiarize with methods a. How to use the results of one method in another method 5. Master the use of exception handling for data format and range checking 6. Master code documentation, compilation, and execution 7. Expose to Java syntax, programming styles, and a Java classes. Problem Description Write a program that mimics the operations of several vending machines. More specifically, the program simulates what happens when the user chooses one of the vending machines, inputs money and picks an item from the vending machine. Assume there are two vending machines: one for drinks and one for snacks. Each vending machine contains several items. The name, price, and quantity of each item is given in two text files, one named "drinks.txt for the drinks vending machine and the other named "snacks.txt for the snacks vending machine. The format of the input values is comma-separated. The items listed should be organized in the file with the following order name, price, quantity. Here are some example items: Milk, 2.00,1 OJ,2.50,6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
