Sie sind auf Seite 1von 1

Guidelines to complete the Sales Management System

As per the questions, you are required to take the input from the user for the sales attribute
which includes ​Goods ID, Description, Price per unit​ and ​Quantity​ only.

Note: ​Total sales​ = ​Price per unit​ * ​Quantity

1. Create a ​menu ​as per the box one in questions.


2. Use the s​ witch case​ to decide which operation to carry out on the basics of the menu.
3. In order to ​Record Sales ​you should know the following concepts in java.
a. Class and Object
b. Single Dimensional Array
c. Array of object

Basically, what you have to do is


1. Create a class called ​Sales ​with the following attribute.
Goods ID, Description, Price per unit​, ​Quantity ​and ​TotalSales.
(Use camelCase)
2. Create a new object of sales, then take the user input and ​set ​value to the
attribute accordingly. For example :- if user input value for description then set
value​ into description attribute of ​object sales​.
3. Once, you set all the values into an object in its ​attribute then ​push / add ​the
object into an array of objects.

So, this completes our process of record sales.

4. View Total Sales,​ simply the sum of all total sales of goods.
5. View Sales Details, ​Operate for loop to print the values from an array of objects.
6. Exit, ​use System.exit(0) to exit a java program.

For reference:

1. https://www.geeksforgeeks.org/classes-objects-java/?fbclid=IwAR0bJsOP2YPKmSVzF8
p3ilgR8nj8IwKxH6T8IIm94nvZHm03f2izSTAMaUo
2. https://www.guru99.com/array-of-objects.html

Make sure to utilize google :)

Das könnte Ihnen auch gefallen