Design the required data structures using UML class diagrams

Assignment Help Data Structure & Algorithms
Reference no: EM131931366

Assignment -

1. Objectives - The purpose of this assessment item is to assess your skills attributable to the specified learning outcomes, and achieving the expected graduate attributes of advanced level knowledge, cognitive, technical, and creative skills, and professional level communication and self-management. The learning outcomes are:

  • Design and implement appropriate data structures for application development.
  • Analyse, develop and implement software solutions with the focus of data structures and algorithms.
  • Apply classes, inheritance, polymorphism, and exception handling.

2. Assessment Task - In this assignment, you are required to analyse the given problem, model, and design the required data structures using UML class diagrams. You will be implementing the software solution applying efficient algorithms, inheritance, polymorphism, and exception handling. Your Java Application should have an interactive Graphical User Interface (GUI) based on the JFrame class using SWING GUI components. You should also write a report as specified demonstrating your conceptual knowledge and communication skills.

2.1 Problem - A restaurant manager wants you to develop a software application which can be used by customers seated at a table to choose their menu items for a selected meal of breakfast, lunch, or dinner. A table can be occupied by more than one customer and all the customers in one table should be able to choose their options and send it. The concerned staff members such as chef, waiter, and billing staff should be able to use the entered data for their job. To make your job easy, initially you develop a prototype. During the prototype development you have to develop a Java Application that lets the user to choose food and beverage items for a lunch menu and display the nutrition values for the individual items and total for the whole meal ordered.

2.2 Modelling and GUI Design - You can use the following guidelines in your modelling and GUI design.

1. First you will design the classes using UML class diagrams and include the attributes with correct data types and all the methods, clearly indicating public or private. This will ease your implementation.

2. A top panel that contains Text fields for text entry, and ComboBoxes (drop down list) for selecting food and beverage. Provide Labels for the Textfields and ComboBoxes.

3. A middle panel that contains a Text area to display the menu choices and nutrition values. Provide a Label to display the Text area.

4. A bottom panel that contains four buttons which are "Enter Data" button, "Display Choices" button, Display Order, "Clear Display" button and "Quit" button.

An example GUI design is shown in Figure 1. You can modify your design to make it more user friendly and add the reasoning for your changes in java doc comments inserted in the source code file.

2.3 Data Structures - You can use the classes given below as a guideline for your design.

1. Customer class

a) Include appropriate fields to store:

Customer's first name: Maximum width 20 characters.

Selected table number: It should be an integer value between 1and 8 with a default value of 1. Raise an exception for wrong entry and allow the user to reenter the value for 3 times.

b) A constructor and necessary accessor and mutator methods to get and set values.

c) A toString() method that displays the customer details.

2. Nutrient class

a) This class should have the fields to store the nutrient name and quantity of nutrient.

Complete the class with necessary constructor, mutator, accessor methods and a toString() method.

3. MenuItem Class

a) This class should have the fields to store:

MenuItem name and an ArrayList of nutrient objects to store the nutrient details.

b) It should also include constructor, mutator, and accessor methods.

c) A toString() method for displaying item details.

d) This class also should have a copy constructor to allocate memory for the ArrayList when the assignment of method calls with parameter passing and assignment of one object to another using the assignment statement are required.

4. OrderedCustomer class

a) This class extends the Customer class. This class should have a member field to store the list of menu items chosen by the customer by clicking the "Enter Data" button.

This class also should have:

b) Constructor, accessor and mutator methods.

c) A toString() method for displaying the OrderedCustomer details.

d) A method to calculate the total of each of the nutrition values.

Use polymorphism while using objects of this class.

5. RestaurantOrderGUI class

a) This class should have the GUI components listed above.

b) It should have the methods to set up the GUI components and the event handling methods.

c) This will also contain the main method.

2.4 Software Tools for Building the Application - You can build your application using the TextPad Editor or NetBeans. You should create the GUI components using code rather than 'designer' and 'click and drag' of the NetBeans. This creates code which is not maintainable. Remember this is a good prototyping tool, but not recommended for coding.

Note: Commence with one class at a time, test it and then incrementally add the next.

2.5 Report - You should write a report which includes a front page with your student details, and the UML class diagrams, and screen shots of execution of your program to demonstrate that you have tested the program. Provide any additional information you want to include, for example reasoning for your particular choice of screen design.

Attachment:- Assignment File.rar

Reference no: EM131931366

Questions Cloud

What is the current stock price in firm : ABC's last dividend was $3.2. The dividend growth rate is expected to be constant at 31% for 3 years, after which dividends are expected to grow at a rate.
Describe what community policing is and why its important : Describe what community policing is and why its important? What is the demographic profile of those who worry about gang violence in there community?
Working together to help the united states : Does my conclusion make sense as grammar and sentence structure.
How much would be need to raise : ABC purchases $276,000 worth of goods from its supplier each year on terms of 1/10, net 30 and currently does not take the discount.
Design the required data structures using UML class diagrams : In this assignment, you are required to analyse the given problem, model, and design the required data structures using UML class diagrams
Images can interfere with the natural : But in all of our creations, the possibility occurs that images can interfere with the natural, necessary order of a thing. And, most of all, this way
Fictitious defense of slavery : Franklin's "On the Slave-Trade" satirizes the defenders of slavery by using a fictitious defense of slavery by the "divan of Algiers" in 1687.
Evaluate weighted average cost capital of the firm : Aaron's Rentals has 45,000 shares of common stock outstanding at a market price of $27 a share. The common stock just paid a $1.10 annual dividend.
Non-traditional students achieving : Proposition statement: Since many adults do not believe that it is possible to return to college and achieve a degree after being out of school for many years

Reviews

len1931366

4/6/2018 6:40:38 AM

Assignment Submission - You should submit the following source code files using the Moodle online submission system. (Note: You are free to change the file names/class names to other meaningful names than given above). The submission should be one zip file containing the source code files and the report. Please do not zip the whole project folder and submit it. Customer.java – Source code for the Customer class. Nutrient.java – Source code for the Nutrient class. MenuItem.java – Source code for the MenuItem class. OrderedCustomer.java – Source code for OrderedCustomer class. RestaurantOrderGUI.java – Source code for the GUI components and main method.

Write a Review

Data Structure & Algorithms Questions & Answers

  Write a function for this modified merge sort scheme

Write a function for this modified merge sort scheme, using quicksort to sort internally the subsists containing SIZE elements for some constant SIZE.

  Determine the centroids for the six departments

Determine the centroids for the six departments in the layout pictured in Figure using the methods outlined.

  Write program for computing of shortest trajectories in abg

Write a program for computation of the shortest trajectories in ABG. Set X (a 2D table with or without obstacles), an element p for which the trajectories should be calculated.

  What i picked up in our reading material flood attack seems

From what I picked up in our reading material flood attack seems to be similar to a Denial of Service (DoS) attack which is designed to bring a network or service down by flooding it with large amounts of traffic.

  Part-1greatest common divisor show a recursive

part-1greatest common divisor show a recursive implementation of euclids algorithm for finding the greatest common

  Function that rotates a two-d array by ninety degree

Write and test the function that "rotates" 90° clockwise a two-dimensional square array of ints. For example, it would transform the array.

  Problem 1nbsp what-if and goal-seeking analysis george is

problem 1nbsp what-if and goal-seeking analysis george is planning to set up a new hair salon in a trendy inner city

  Develop an online shopping system for the stakeholders

Online shopping becomes increasing popular nowadays. It brings many advantages to both sellers and buyers. Metro Shopping (MS) is planning to develop an online shopping system for the stakeholders.

  Write down the algorithm to insert an item

Write down the sample code to create a Linked List and allocate storage space for a node Write down the algorithm to insert an item At the beginning of a linked list

  Write an algorithm that displays the squares of the number

Using a FOR loop,I need to write an algorithm that displays the squares of the number 1 to 10to console out put

  Babylonian algorithm

Babylonian Algorithm. The Babylonian algorithm to compute the square root of a positive number n is as given:

  Write sql select statement that would re-organize results

Describe an algorithm that you could implement that would allow you to find a given person's telephone number in the shortest amount of time

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