1. Objectives

The purpose of this assessment item is to assess your skills attributable to the following learning outcomes, and achieving the expected graduate attributes of advanced level knowledge, cognitive, technical, and creative skills, ethical and professional responsibility, and professional level communication, research, and self-management.

  • Compare and contrast different algorithms in problem solving.
  • Design and implement appropriate data structures for application development.
  • Evaluate a variety of data structures and algorithmic approaches including: recursion, linked lists, stacks, queues, streams, search trees, sorting, and searching.
  • Analyse, develop and implement software solutions with the focus of data structures and algorithms.
  • Apply classes, inheritance, polymorphism, and exception handling.
  • Programmatically connect to a database and implement the database operations.
  • Work collaboratively as part of a small team.
  • Demonstrate socially innovative practices in software development.

2. Assessment Task - Paired Programming

In this assignment, you and your partner are required to analyse the given problem, model and design the required data structures using UML class diagrams. Your design should include use of generic data structures such as linked lists, queues, and streams. You will be implementing the software solution applying searching and sorting algorithms, inheritance, polymorphism, and exception handling. Your Java Application should have a three tier architecture with a front-end interactive Graphical User Interface (GUI) based on the JFrame class using SWING GUI components, the middle layer implementing the business logic, and the back-end database storing the entered data. Your application will connect to a database programmatically, executing necessary SQL queries within your java program. You should also write a report as specified, demonstrating your conceptual knowledge and communication skills.

2.1 Problem

This is an extension to the problem given in Assessment Item 1 as specified here. A restaurant manager wants you to develop a software application which can be used by customers 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. In this Assessment, you have to extend the prototype developed as part of your first Assessment to a fully-functional application that can be released as a beta version for initial testing. In the application, the manager wants you to add the features that enable the orders for the chef needs to prepare, and the orders which are to be billed to the customers.

The manager is also keen to support healthy eating habits especially for those who may want to follow healthy heart diet. This means your software should allow customers to choose the option of healthy heart diet and that should follow display of menu items that falls within this category. As a software developer interested to in socially innovative practices in software development, you need to come up with ideas of additional features required to support the manager's interest to promote healthy heart diet. This can also include extra icons, labels, or images you would suggest.

2.2 Modelling and GUI Design

You can use the following guidelines in your modelling and GUI design.

1. First go through the design and modelling of your first assignment. Discuss the issues with your partner, and come to a unified view on how to go ahead with the second assignment. Incorporate UML class diagrams from your first assessment and make necessary modifications and complete the design and modelling for this Assessment item.

2. A top panel that contains two TextFields, three RadioButtons to select meal (breakfast, lunch, dinner), two ComboBoxes (drop down list) for selecting food and beverage, two JLists for displaying orders with "waiting" and served statuses and necessary number of Labels.

3. A middle panel which contains a Text area to display the menu choices and nutrition values for the customer.

4. A bottom panel which contains seven buttons which are "Enter Data" button, Display Choices button, Prepare button, Bill button, Clear Display button and Quit button.

The functions of the additional buttons and any updated functionality for the already existing buttons are described below.

1. Enter Data

In addition to the details provided in Assessment Item 1, the customer should choose one of the meals of breakfast, lunch or dinner using the RadioButtons before selecting the food and beverage choices. When the customer enters his/her name in the TextField, the "Prepare", and Bill buttons should be deactivated. Once the customer chooses and sends the list of menu items an order should be generated and the list should be saved to the database. The order status should be set to waiting.

The list of food and beverage items for different meals, and associated nutrient values are given in the data file (.csv) available from the unit website.

. 2. Prepare

An order will have one of the four statuses of "waiting", served or billed. A chef should be able to browse through the waiting list and select all the orders with the same MenuItem id and click the Prepare button. This should change the order status to served for the chosen items. (Hint: display sorted orders for the chef, selecting the orders having status waiting. Use JList with MULTIPLE_INTERVAL_SELECTION).

3. Bill

The billing staff uses the "served" list of items to bill and clicks the Bill button which changes the order status to billed.

2.2 Data Structures

You can use the class descriptions given below as a guideline for your design. The details given below are only for updated classes or additional classes with respect to your first Assessment Item. This means, you will incorporate other necessary classes from your first Assessment.

1. OrderedCustomer class

This class should have the orderStatus, an enum type object to store the order status in addition to the attributes and methods suggested in Assessment Item 1.

2. RestaurantOrderGUI class

This class should have additional data structures for the efficient execution of the application. These include a LinkedList to store the OrderedCustomer objects. These will be saved to the database. In case of a restart of a computer it should load the day's order list from the database. This should have implementation of Queue interface or PriorityQueue objects to maintain and display of different lists of orders with different statuses such as "waiting, or "served.

3. DatabaseUtility class

Create this class to implement all the tasks related to creation of database and table, extracting records from the database. Use 'prepared statements' to get the user input from GUI interface and use them for populating the database. Also use prepared statements to execute queries to extract data and store the records in a linked list.

2.3 Data base Tables

You can use the details given below as a guideline for your database.

a) MenuItem Table

This table will have the menuItemId as primary key and menuItem name as text.

b) Nutrient Table

This table will have a composite key consisting of nutrientId and menuItemId as primary key, and other fields to store the nutrient details

c) OrderedCustomer Table

This will have orderId, primary key, customer name, text, orderDate, Date and table number, integer.

d) OrderedMenuItem

This will have a composite primary key consisting of orderId and menuItemId.

Note:The primary keys are generated during the programmatic creation of the tables and used for other database operations. These keys need not be displayed to the user. The primary keys can be auto-incremented integer values. You may add any other tables to resolve many-to-many relations. Create an ERD to understand the relationship between tables.

2.4 Paired Programming

Complete the assignment working in pairs. You can choose your partner yourself. You should ensure that you inform your tutor about the partner. If you have any problem with choosing a partner, please inform your tutor. Distance students also can work in pairs. If there are any problems please contact the Unit Coordinator.

2.5 Individual Report

Your report should be written individually and submitted by each one of you. In your report clearly show your partner for the application development.

1. You should include your UML class diagrams and screen shots of your program execution demonstrating proof of testing.

2. Your report should also clearly address how you will modify the design and include additional features to promote the healthy heart diet program as desired by the Restaurant manager. You can demonstrate this by including a GUI design which can be created using the click and drag feature of NetBeans GUI design. You can also write about features or icons you may include to make it easy for customers to choose healthy heart menu items.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.