WRITE CODE IN JAVA

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

WRITE CODE IN JAVA

Post by answerhappygod »

Write Code In Java 1
Write Code In Java 1 (129.34 KiB) Viewed 37 times
WRITE CODE IN JAVA
Reset to 1. Problem 1: Food Vending Machine saved 60 points possible Problem Description You will write a program in this series of problems that enables a food vending machine to process basic transactions. In this first problem, you will calculate the amount of cash to a return to a buyer for a given transaction. The program will take as input information from the customer first and last name as well as the item to be purchased. The cost of an item as well as the amount of cash given by the customer will also be recorded. Input You will receive (from the user) the following as input (in order): • The name and flavor of the product (e.g., Lays Classics) • The item to be purchased, identified through a barcode number (e.g., 1909238092) • The cost of the item to be purchased by the customer (e.g., 8.50) • The cash amount given by the customer (e.g. 10.00) Processing 1. Print the data stored in each variable in the corresponding format Hint: Carefully compare each test case output values to note space delimiters and number of decimals for floating-point numbers Output • Product (Name): {Name Flavor} Item Number: (NUMBER) • Item Cost: {COST) Cast Amount: (CASH) Examples Input Lays Classics Output Product (Name): Lays Classics 1909238092 Item Number: 1909238092 8.50 10.00 Cheetos Fire Item Cost: 8.50 Cash Amount: 10.00 Customer (Name - Flavor): Cheetos - Fire 1909555469 Item Number: 1909555469 5.00 10.00 Item Cost: 5.00 Cash Amount: 10.00
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply