0% found this document useful (0 votes)
27 views1 page

Guidelines To Complete The Sales Management System: P3Ilgr8Nj8Iwkxh6T8Iim94Nvzhm03F2Izstamauo

The document provides guidelines for completing a Sales Management System program in Java. It instructs the user to take input for sales attributes including Goods ID, Description, Price per unit, and Quantity. Total sales is calculated as Price per unit multiplied by Quantity. The program should create a menu using switch case and allow the user to record sales by creating a Sales class with attributes, creating Sales objects, setting attribute values, and adding objects to an array. It also describes how to view total sales by summing all total sales, and view sales details by printing array values.

Uploaded by

sajan gc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views1 page

Guidelines To Complete The Sales Management System: P3Ilgr8Nj8Iwkxh6T8Iim94Nvzhm03F2Izstamauo

The document provides guidelines for completing a Sales Management System program in Java. It instructs the user to take input for sales attributes including Goods ID, Description, Price per unit, and Quantity. Total sales is calculated as Price per unit multiplied by Quantity. The program should create a menu using switch case and allow the user to record sales by creating a Sales class with attributes, creating Sales objects, setting attribute values, and adding objects to an array. It also describes how to view total sales by summing all total sales, and view sales details by printing array values.

Uploaded by

sajan gc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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 :)

You might also like