Create a connection and interface with the database

Assignment Help Database Management System
Reference no: EM131230389

Lab-Database Connectivity

OBJECTIVES

• Programmatic access to a MySQL database to add and display records

PROBLEM: Student Management System

A teacher needs the ability to store and retrieve student data. This includes

• student name;
• three test scores;
• average; and
• letter grade.

FUNCTIONAL REQUIREMENTS

You can code the GUI by hand or use NetBeans GUI builder interface.

Create a GUI which allows for input and display of student data.

It should include buttons to save a record, display all records.

Create a database and table to store student name andthree test scores. (Note that average and grade are calculated by app.)

Student class

Create a Student class to manage the student data. It should have private instance variables of

• student name; and
• three test scores.

The class must have the following methods.

• A default and parameterized constructor
• Sets/gets for all instance variables
• A get method to calculate and return the average
• A get method to calculate and return the letter grade
• toString to display the name of the student

StudentDB class

Create a StudentDB class that is used to create a connection and interface with the database.

This class should have two methods.

• getAll-reads data from database, returns data in an arraylist of student objects
• add-writes a record to the database

GUI class

Insert button will take the info from the GUI (student name and three test scores) and insert a record into the table. Input should be cleared from the textboxes.

Display buttonwill read the data from the database and creates a report in Console window, sample format below.

Name             Test1       Test2       Test3       Avg Grade
Bruce Wayne    90            95           98           94.3 A
Clark Kent        65            70           90           75.0 C

Reference no: EM131230389

Questions Cloud

What is the ethical dilemma presented by this case : Will Facebook be able to have a successful business model without invading privacy? Explain your answer. Are there any measures Facebook could take to make this possible?
Create job description for benefits manager position : Create a complete job description for the Benefits Manager position using O*NET. - Calculate the job evaluation points for the administrative assistant, payroll assistant, operational analyst, and benefits manager jobs.
How does fast fashion change/impact the marketing channel : Given the advantages and disadvantages of Zara's fast fashion (p. 514-516), would you still use this type of distribution strategy if you were a channel manager? Why or why not?
Design the vertical alignment of the road for a design : NEC2204 HIGHWAY ENGINEERING ASSIGNMENT - Calculate the chainage of the CS and ST and design the vertical alignment of the road for a design speed of 70km/h.
Create a connection and interface with the database : Create a StudentDB class that is used to create a connection and interface with the database. Create a Student class to manage the student data. It should have private instance variables of student name.
How have information systems affected everyday life : Define and describe technostress and RSI and explain their relationship to information technology.
What problems are raised by this database : When buying a crib, or other consumer product for your family, would you use this database? Why or why not?
Provide ways in which encryption can make a digital forensic : Provide at least three ways in which encryption can make a digital forensic examiner's job harder, and three ways that a digital forensic examiner can use encryption to his/her advantage.
Describe each of the components in the data hierarchy : What are the problems of managing data resources in a traditional file environment and how are they solved by a database management system?

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

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