Calculate and store shop price for all items

Assignment Help JAVA Programming
Reference no: EM131650482

Assignment task

Write a java console application that allows the user to keep track of various items in a grocery shop. The application must allow the user to read, validate, store, display, sort and search the item name (String), item id (integer number), quantity of the item in-stock (integer number), factory price (double number) and shop price (double number) for N items in the grocery shop. N should be declared as a constant and it should be equal to the largest digit of your student id number (e.g. if your ID number is S0234111 then N should be equal to 4 and you can declare it as final int N=4;). The item name, item id, quantity of the item in-stock, factory price and shop price must be stored in five separate single dimension Arrays/ArrayLists (index 0 for item 1 and index N-1 for item N). The minimum and maximum id numbers which can be stored are 1 and 333. The minimum and maximum factory prices for each item which can be stored are $1 and $1000. The item id and factory price must be entered from the keyboard and a validation for minimum and maximum values must be done.

Your application should display and execute a menu with the following options. A switch statement must be used to execute the following menu options.

1. Read, validate and store all items

2. Calculate and store shop price for all items

3. Display all items

4. Sell an item

5. Display all items with the lowest factory price

6. Sort and display sorted items

7. Exit from the application

Program design -

You may use any design that meets the specification. However, a good design will adhere to the following guidelines:

  • be logically correct
  • be easy to read and maintain
  • be well-designed
  • use a UML activity diagram
  • use appropriate classes, methods and fields

Testing - Testing is important. You should:

  • List the different types of test cases.
  • Display the results for each test case.

Attachment:- Assignment File.rar

Reference no: EM131650482

Questions Cloud

List the contents of the current directory : List the contents of the current directory. Create the directory structure and create the files as defined in the previous Individual Project.
Discuss workers compensation due to his health issues : workers compensation due to his health issues, and analyze the key legal and ethical issues faced by Brads employer throughout this process
Pro and con of a trade agreement among countries : Discuss the Pro's and Con's of a trade agreement among countries. NAFTA has is the trading agreement between the US, Mexico, and Canada.
Explore the issues surrounding unix security : Explore the issues surrounding UNIX security. Specifically, identify major threats to systems running UNIX and list the steps system administrators.
Calculate and store shop price for all items : Write a java console application that allows the user to keep track of various items in a grocery shop. Calculate and store shop price for all items
Design queries using professional principles and standards : Design the below queries using professional principles and standards. A set of SQL Statements that returns all rows and all data for each table in database.
Compare throughput-turnaround time and response time : Compare and contrast throughput, turnaround time, and response time. Explain what each measures and how they are monitored.
Light poles utilized in a construction project in florida : the light poles could be deemed nonconforming based not on their performance but rather on their untimely delivery
Challenging aspect of the change process : What is personally the most challenging aspect of the change process for you (eg: your personal resistance to change such as lack of control

Reviews

len1650482

9/20/2017 3:36:36 AM

Australian student, My student ID.The largest number is 6 so you declare N=6 as a constant. What to submit - You should submit online the following files. GroceryShop.java (this file contains java code for class GroceryShop). GroceryShopTest.java (this file contains java code for class GroceryShopTest). Report.docx (this file contains a brief report that includes student name, student ID, course name, course code, UML activity diagram for menu option 4 (Sell an item) and test results (screenshots/test cases with results to show that your application is correctly working)). Warning: You must submit your own work and correct files.

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd