Write a program that displays the cost of different options at a vending machine. Your program must, read in a selection char from a file called input.txt, • use case statements to select the price...


Pls use case statements


Write a program that displays the cost of<br>different options at a vending machine. Your<br>program<br>must,<br>read in a selection char from a file called<br>input.txt,<br>• use case statements to select the price<br>linked to the input char,<br>• write the price corresponding to the char to<br>a file called output.txt.<br>Table 4: Vending machine options.<br>Product<br>Selection char<br>Cost<br>Cheese naks<br>Doritos<br>Coke<br>a<br>R5.50<br>b<br>R7.50<br>Chappie<br>Tex<br>Bar-one<br>R12.00<br>R2.00<br>R8.00<br>R7.00<br>d<br>e<br>f<br>• If the char is not present in the file write -1<br>

Extracted text: Write a program that displays the cost of different options at a vending machine. Your program must, read in a selection char from a file called input.txt, • use case statements to select the price linked to the input char, • write the price corresponding to the char to a file called output.txt. Table 4: Vending machine options. Product Selection char Cost Cheese naks Doritos Coke a R5.50 b R7.50 Chappie Tex Bar-one R12.00 R2.00 R8.00 R7.00 d e f • If the char is not present in the file write -1

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here