CSIT121 Programming Fundamentals Assignment

Assignment Help JAVA Programming
Reference no: EM133168056

CSIT121 Programming Fundamentals - University of Wollongong

Requirements:

• You should create your programs with good programming style and form using proper blank spaces, indentation and braces to make your code easy to read and understand.
• You should create identifiers with sensible names.
• You should make comments to describe your code segments where they are necessary for readers to understand what your code intends to achieve.
• Please add the following header in your program:

Objectives
This assignment requires you to design and implement a Graphic User Interface (GUI) for the customers and products Order System (OS) by using Java Swing. Meanwhile, the file I/O and exception handling shall be implemented in the assignment.

Background
You are required to design, implement, and test an ordering system with the Graphic User Interface (GUI). The program shall
1) Load customers' data and products' data when the program starts.
2) Display GUI to help a customer to make new orders.
3) Handle possible exceptions during the interaction between the customer and the system.
4) Save the customer orders to a text file.

The UML class diagram of OS is given below. You can add new classes, methods and/or attributes in the UML class diagram but CAN NOT delete any existing classes, attributes, and methods. Your java implementation must be consistent with the UML class diagram.

The format of a file products.txt contains the data like

Alice Mutton,Pavlova Ltd.,Meat/Poultry,0,39.00 Aniseed Syrup,Exotic Liquids,Condiments,13,10.00
Boston Crab Meat,New England Seafood Cannery,Seafood,123,18.40 Camembert Pierrot,Gai paturage,Dairy Products,19,34.00

Each row is a record of a product. The fields of a product consist of product name, supplier name, category, stock quantity, and unit price. Each field is separated by a character comma (,).

In this assignment, we can assume that the input text files are customers.txt and
products.txt.

The detailed requests are as follows:

1. Update your UML diagram
You shall update the UML class diagram by adding a new GUI class (for a new order). You can add classes, methods, and attributes. Please make sure your implementation is consistent with your UML class diagram.

2. Design and implement a GUI.
The OrderSystem class shall contain Swing components, such as JFrame, JPanel, JLabel, JTextField, JButton, JList, JTextArea, etc. With the GUI, a customer can complete the order of products.

3. Customer ordering
After initialization, the GUI of customers and products OS will be displayed. If a customer is selected from a list, the details of the customer are displayed. The customer can start a new window when clicks a button New Order and place a new order of products.
a. The new order number and order date are automatically generated.
b. The order number start from 1 when there is no order in the container orders. The new order number is the size of the container orders plus 1.
c. The order date is the current system date.

4. Order products
The customer can start to order any products via the GUI. When the customer selects a new product from a list, the product's details are displayed.
a. The customer can click the button Order>> to place the product in the order list. The stock quantity of the product should be decreased by 1. Display the updated product details and order details.
b. If the customer selects an ordered product, then clicks the button Unorder<<, the product order quantity is decreased by 1. If the order quantity is 0, then the product is removed from the order list. Display the updated product details and order details.
c. If the customer clicks the button Ok, the new order is stored in the container orders and quits the window.
d. If the customer clicks the button Cancel, quit the window without saving the new order.

5. Save the order details
When a customer clicks the button Save Order, all the order details are saved to a text file
orders.txt.

6. Exception handling

The system shall be able to handle the exceptions during the interaction between the customer and the system. The exceptions may include invalid information when loading customers and products. Invalid data when a product is ordered.

Check the sample processing in a file Assignment3_sampleProcessing.pdf and watch the demonstration video for more details.

Tasks

Task 1: Update the UML class diagram based on the design given above. You are allowed to add new classes, more attributes, or more methods.

Task 2: Implement the program according to the updated UML class diagram by using Java. The program shall

• Be consistent with the UML class diagram;
• Design and implement the GUI by using Java Swing. Please make sure to use JFrame, JPanel, JLabel, JTextField, JButton, JList, JTextArea, etc. in your GUI;
• Follow the conventions for naming all classes, variables, and methods, and provide sufficient comments;
• Be implemented by using the advanced OOP features such as inheritance, polymorphism, abstraction, interface, and/or class downcasting.
• Be able to initialise the customers and products OS;
• Be able to help the customer to complete the ordering via the GUI;
• Be able to handle possible exceptions during the ordering process;
• Be able to view or modify the current order list via the GUI;
• Be able to export the customer's orders to a single text file.

Task 3: Compilation and test.

- Please compile your program with ‘javac' and carefully test your program for all the requests.
- Test your program to all cases in GUI.
- Please do not define the package in your program (a special alert for students who use IDE to complete the assignment).

Attachment:- Programming Fundamentals.rar

Reference no: EM133168056

Questions Cloud

Calculate the cost of preference shares : The debt to equity ratio of the company is 0.6. Of the equity, 65% is ordinary equity and 35% is preference equity. Calculate the cost of preference shares
What appears on the income statement and the balance sheet : Shortly thereafter, one of these three is sold for $40 cash. If FIFO is applied, what appears on the income statement and the balance sheet
Journalize the business transaction for the company : Journalize the business transaction for the Company journal on 31st of January. Take into consideration that the Company prepares the adjusting journal entries
Briefly explain classification and measurement requirements : Briefly explain the classification and measurement requirements if Hardware Direct Ltd acquired the loan from Wakefield Ltd rather than Abacus Finance Ltd
CSIT121 Programming Fundamentals Assignment : CSIT121 Programming Fundamentals Assignment Help and Solution, University of Wollongong - Assessment Writing Service
What is the administrative fee for the year : Your variable annuity charges administrative fees at an annual rate of 0.10 percent of account value. What is the administrative fee for the year
Compute the employee benefit expense : Decrease in projected benefit obligation due to change in actuarial assumptions 200,000. Compute the employee benefit expense, total remeasurement gain
What is included in the journal entry : The entity declared to adopt PAS 19R on January 1, 2020. What is included in the journal entry to effect the initial adoption on January 1, 2020 of PAS 19R
What is the rate of return for this investment : Assume that at the beginning of the year, you purchase an investment for $9,300 that pays $105 annual income. What is the rate of return for this investment

Reviews

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