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

  Create a class to encapsulate the data and behavior

Create a class to encapsulate the data and behavior of a product in a store's inventory. The class should have the following data for an inventory item

  Write an android phone program such that usca

Write an Android phone program such that "USCA, the best university in the world" is displayed on the AVD.

  Sequence of non-negative integers

Write some code that uses a loop to read such a sequence of non-negative integers, terminated by a negative number.

  Text file of strings representing numbers

Design a program that will search a text file of strings representing numbers of type int and will write the largest and the smallest numbers to the screen.

  Turtle executing the no argument constructor

Use a complete Java statement that will instantiate a new object named timmy of data type Turtle executing the no argument constructor.

  Create a new project in your ide named animalinfo

Create a new project in your IDE named "AnimalInfo." Create a class called "AnimalInfo" as the main class for the program.

  Implement savings account using locks and conditions

A savings account object holds a non-negative balance - Use a shared counter protected by test-and-test-and-set lock. Each thread locks the counter, increments it, releases the lock, and repeatedly reads the counter until it reaches n.

  Create an if-statement and case statement

Draw a line using 4 points, draw a circle or filled circle using diameter and coordinates.Create an if-statement and Case Statement.

  Create a program that expands abbreviations

Create a program that expands abbreviations - I don't know how that happened. talk to you later - Upload the final project

  Class diagram represents the relationship between parents

Draw a class diagram that represents the relationship between parents, children, and grandparents. Take into account that a person can have both a parent and a child. Annotate associations with roles and multiplicities.

  What is the purpose of the main method in a java application

Discuss the following questions with your classmates. What is the purpose of the main method in a Java application program? Can you write a Java program without it? Why? Why not?

  Calculates the cost of a mortgage

Write a class called Mortgage that calculates the cost of a mortgage. Prompt the user to enter the principal amount, the term in years, and the interest rate per year.

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