Create a map and store the names with associated student id

Assignment Help Data Structure & Algorithms
Reference no: EM131043123

Objectives

- Analyse, develop, and implement software solutions
- Choose and compare appropriate data structures and algorithms in program design
- Apply classes, inheritance, polymorphism, and exception handling
- Test software implementations to ensure correctness and maintainability

Assessment Task

Part A

In this assignment, you are required to write a Java Application that uses an interactive Graphical User Interface (GUI) based on the JFrame class using SWING GUI components. You will also be designing and implementing the software solution using appropriate data structures and application of classes, inheritance, and exception handling. The case study for developing a solution is given below.

The food consumption of a person is to meet the daily energy requirements. The energy requirement is estimated using a person's height, weight, Basal metabolic rate (BMR), and physical activity level (PAL). There is data available on estimated energy requirements for various PALs, and BMR. So by choosing the correct height and PAL, the energy requirements can be found from the data set. In Assignment One you have developed a Java Application that lets the user to enter height and choose the most suitable PAL and thereby display the energy requirements in Mega Joules.

In this assignment you extend your first assignment so that the user can save the user details of name, height, age group, gender, PAL level, energy requirement, and expected weight to a database table named userEnergy. Also your application should display all the user's data from the database. In addition to the GUI components you have in Assignment One, include the following components.

1. Save Button in the bottom panel, to save the user data to the database.

2. Display All Button in the bottom panel to display the saved data of all users from the database.

The functions of two additional buttons are described below.

1. Save

The Save Button can be used to save the User Energy needs to the data base.

Note: Use the given data file named COIT20256Ass1Data.csv available on the course website and it contains the set of data.

2. Display All

This Button enables the user to view all the database records displaying user details and their energy requirements. The database records will have a unique id. It is not essential to display the id.

The screen with additional buttons are shown below.

449_Java Application.jpg

Initial Screen Display

2191_Java Application1.jpg

Screen Display on Clicking "Display All"

Data Structures

DatabaseUtility class: Create this class to implement all the tasks related to creation of database and table, extracting records from the database. Include a linkedList of UserEnergyNeeds class to store the extracted data from the database. Use Prepared statements to get the user input from GUI interface and use them for populating database. Also use prepared statement to execute query to extract data and store the records in a linked list.

Software Tools for Building the Application
You can build your application using the TextPad Editor or NetBeans. It is highly recommended that you 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.

Part B

Your task in this part of the Assignment is to demonstrate use of various data structures such as stack, priority queue, set, and map using the given data.

While using these data structures to store explain the benefits you can achieve by using the appropriate data structures. You need to complete the following steps in use of various data structures.

1. Read the names from the file and load in a priority queue. Display the values from the priority queue using the peek() method. Describe your observation of change to the list of names in the report file.

2. Move the list of names from the priority queue to stack. Move the list of names from stack while displaying the value to a set. Describe your observation of the stack list of names.

3. Display the names from the set and again describe your observation the list of names.

4. Create a map and store the names with associated student Id and display the values.Part B

Your task in this part of the Assignment is to demonstrate use of various data structures such as stack, priority queue, set, and map using the given data.

While using these data structures to store explain the benefits you can achieve by using the appropriate data structures. You need to complete the following steps in use of various data structures.

1. Read the names from the file and load in a priority queue. Display the values from the priority queue using the peek() method. Describe your observation of change to the list of names in the report file.

2. Move the list of names from the priority queue to stack. Move the list of names from stack while displaying the value to a set. Describe your observation of the stack list of names.

3. Display the names from the set and again describe your observation the list of names.

4. Create a map and store the names with associated student Id and display the values.

The reference should be in Harvard style.

Attachment:- COIT20256Ass2T1Data2016.csv

Verified Expert

This project is about extending assignment 1 about Food consumption and BMI calculation from the given excel file. This assignment has part B, it deals with the use of data structures and its behavior. screenshot and test plan are given in reportAssgn2.docx. Answers to questions are given in seperate docx file.

Reference no: EM131043123

Questions Cloud

In case representing pairs as procedures : In case representing pairs as procedures wasn't mind-boggling enough, consider that, in a language that can manipulate procedures, we can get by without numbers (at least insofar as nonnegative integers are concerned) by implementing 0 and the..
Employee receives a reward for performance : According to equity theory, after an employee receives a reward for performance, what is the next step the employee takes in the motivation process?
Distant relative of the famous painter graham hines : In California Barry signs a contract to purchase from Sally (a distant relative of the famous painter Graham Hines) a signed lithograph print by Hines marked "no. one out of ten." The sales price is $10,000. No other prints in the same series have tu..
Evaluate potential grand strategies for the organization : Recommend a strategy or combination of strategies the organization should implement, and include a rationale for that recommendation.
Create a map and store the names with associated student id : Display the values from the priority queue using the peek() method. Describe your observation of change to the list of names in the report file.
Focus on jobs as a transformational leader : Select one transformational attribute of Steve Jobs that positively affected the leader’s organization. How did Steve Jobs illustrate this attribute? focus on Jobs as a transformational leader!
Chinese online auctions market : Discuss the rationale behind Ma establishing Taobao.com. What are the factors that led to Taobao's success as compared to eBay in the Chinese online auctions market?
Described his contract negotiation methods and pricing : Donald Trump described his contract negotiation methods and pricing as follows, "When I build something for somebody, I always add $50 million or $60 million onto the price. My guys come in, they say it's going to cost $75 million. I say it's going t..
Manufacturer of plastic knobs for lawn and garden tractors : Plaskor Inc. is a manufacturer of plastic knobs for lawn and garden tractors and lawn mowers. The company has always used traditional paper-based systems to conduct transactions with its customers. For example, when a customer ordered knobs, Plaskor ..

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Which of insertion sort-mergesort and quicksort are stable

A sorting algorithm is described as stable if equal elements are in the same relative order in the sorted sequence as in the original sequence.

  Describe the data information decision

Describe the Data Information Decision

  Draw the graphic for the healthy set

Draw the graphic for the healthy set, representing the values, healthy and unhealthy - What is the degree of membership to the fuzzy set healthy of person B who has a BMI of 26.2? And to the fuzzy set unhealthy?

  What are some likely future uses and enhancements

Describe a specific web or mobile application'spurpose. How is it used? What changes has it brought about to its users? What are some likely future uses and enhancements

  Method singleparent returns number of nodes in binary tree

Write a method singleParent, which returns number of nodes in a binary tree that have only one child.

  Create a professional-looking document

When you are done searching, highlight the text from the article or source being displayed in your browser (left click & drag cursor). Then while the text is still highlighted, right click and select Copy.

  Adt description

Which of the following is not the part of ADT description? Which of the following is true about the characteristics of abstract data types

  How the steps are performed by this algorithm

Consider the following algorithm (known as Horner's rule) to evaluate f(x) = summation from i=0 to N of aix^i.

  Compute result for receiver after error detection algorithm

If receiver A receives 101010010011100100011101 and another receiver, B, receives 101011111111100100011101 compute the result for each receiver after error detection algorithm is run?

  Determine how long the specific algorithms take

Some problems can be theoretically solved (we can explain the algorithm solving problem). How long does the specific algorithms take?

  Decision tree to help someone

Create a decision tree to help someone determine what meal to buy at a fast food restaurant. The structure of your tree should be similar to the one on page 699.

  Create algorithm to read file of employee records

Create the algorithm which will read the file of employee records and produce the weekly report of gross earnings for those employees.

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