Supposing you are operating a warehouse that receives and issues out items daily, and at the end of each day, you take stock of the transactions. Answer the following based on your knowledge in Java Programming. a) Provide a suitable name for your warehouse. b) Suggest the type of item you are dealing with and the cost of each item (e.g. bags of cement at 50 cedis per bag). c) Write a Java programme named transactions.java that takes input from you in the form of: positive integers representing the number of items brought in each time, and negative integers representing the number of items issued out each time. The programme will then calculate and print out the total number of items received and issued out, as well as their corresponding total costs. Your programme ends when the input is zero (0). Here is a sample run: Type in a positive integer representing the number of items received each time, and a negative integer representing the number of items issued each time and press enter. Enter zero to end the programme: //user enters for e.g. 2 5 -7 -2 9 -8 0 //display The total number of items issued out is 17 //i.e. the negatives The total cost of the items issued out is 850.00 cedis. //(i.e. 17 x 50) The total number of items received is 16 The total cost of the items received is 800 cedis. //(i.e. 16 x 50) You score extra marks if you can print out the total number of items issued out as a positive number

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Supposing you are operating a warehouse that receives and issues out items daily, and at the end of each day, you take stock of the transactions. Answer the following based on your knowledge in Java Programming.

a) Provide a suitable name for your warehouse.
b) Suggest the type of item you are dealing with and the cost of each item (e.g. bags of cement at 50 cedis per bag).
c) Write a Java programme named transactions.java that takes input from you in the form of: positive integers representing the number of items brought in each time, and negative integers representing the number of items issued out each time. The programme will then calculate and print out the total number of items received and issued out, as well as their corresponding total costs. Your programme ends when the input is zero (0).

Here is a sample run:


Type in a positive integer representing the number of items received each time, and a negative integer representing the number of items issued each time and press enter. Enter zero to end the programme:

//user enters for e.g. 2 5 -7 -2 9 -8 0
//display
The total number of items issued out is 17 //i.e. the negatives
The total cost of the items issued out is 850.00 cedis. //(i.e. 17 x 50)
The total number of items received is 16
The total cost of the items received is 800 cedis. //(i.e. 16 x 50)

You score extra marks if you can print out the total number of items issued out as a positive number

Supposing you are operating a warehouse that receives and issues out items daily,
and at the end of each day, you take stock of the transactions. Answer the following
based on your knowledge in Java Programming.
a) Provide a suitable name for your warehouse.
b) Suggest the type of item you are dealing with and the cost of each item (e.g.
bags of cement at 50 cedis per bag).
c) Write a Java programme named transactions.java that takes input from you in the
form of: positive integers representing the number of items brought in each time,
and negative integers representing the number of items issued out each time.
The programme will then calculate and print out the total number of items
received and issued out, as well as their corresponding total costs. Your
programme ends when the input is zero (0).
Transcribed Image Text:Supposing you are operating a warehouse that receives and issues out items daily, and at the end of each day, you take stock of the transactions. Answer the following based on your knowledge in Java Programming. a) Provide a suitable name for your warehouse. b) Suggest the type of item you are dealing with and the cost of each item (e.g. bags of cement at 50 cedis per bag). c) Write a Java programme named transactions.java that takes input from you in the form of: positive integers representing the number of items brought in each time, and negative integers representing the number of items issued out each time. The programme will then calculate and print out the total number of items received and issued out, as well as their corresponding total costs. Your programme ends when the input is zero (0).
Type in a positive integer representing the number of items received each
time, and a negative integer representing the number of items issued each
time and press enter. Enter zero to end the programme:
Iluser enters for e.g. 2 5 -Z2 9 -8 0
Ildisplay
The total number of items issued out is 17. i.e. the negatives
The total cost of the items issued out is 850.00 cedis. Ili.e. 17 x 50)
The total number of items received is 16
The total cost of the items received is 800 çedis. Ii.e. 16 x 50)
You score extra marks if you can print out the total number of items issued out as a
positive number
Transcribed Image Text:Type in a positive integer representing the number of items received each time, and a negative integer representing the number of items issued each time and press enter. Enter zero to end the programme: Iluser enters for e.g. 2 5 -Z2 9 -8 0 Ildisplay The total number of items issued out is 17. i.e. the negatives The total cost of the items issued out is 850.00 cedis. Ili.e. 17 x 50) The total number of items received is 16 The total cost of the items received is 800 çedis. Ii.e. 16 x 50) You score extra marks if you can print out the total number of items issued out as a positive number
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education