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

  Create the primary and foreign key using a uml class diagram

Create the primary key and foreign keys using a UML Class diagram for each table and compare and contrast the key aspects that each system offers

  Use of dictionary-managed tablespaces in database

our current database uses dictionary-managed tablespaces. In running various performance tuning scripts, you have discovered that one of these tablespaces seems to have run out of space long before you calculated that it would.

  Object-oriented client database assignment

Imagine that a customer has come to your team and has requested a simple application that will allow the customer to store client names, addresses, and telephone numbers. The application will be written as a console app

  What is the purpose of a database driver

what is the purpose of a database driver in terms of what it connects and What are some other examples of Database Drivers out there for the J2EE and .NET Platforms?

  Explain the diference between hash indexes and b+- ree index

Explain the difference between Hash indexes and B+- ree indexes. In particular, discuss how equality and range searches work, using anexample.

  Write a five pages research paper about oracle

Write a five pages research paper about Oracle, Microsoft SQL server, SyBase, DB2 and MySQL. The paper is focus on Enitity/Relation model and relational database. You need to provide the hosories of ER Model and relational databases.

  What other dbms constructs came after relational databases?

What other DBMS constructs came after relational databases?

  Retrieve the data from a database using subqueries and joins

Write SQL statements that will retrieve the following data from a database, using Subqueries and Joins. Using the Northwind database, write a SQL SELECT statement that will retrieve the data for the following questions

  Question 1a explain the use of facts dimensions and

question 1a explain the use of facts dimensions and attributes in a star schema model.b in relation to a fact table

  Create a database diagram with the entities and attributes

Create a database diagram with the entities and attributes that the scenario identified (i.e., a college tracking students, courses, and instructors).

  Database for a library of a university

Each book has different ID (also each book of same name and same author (but number of copies) will have different ID), author name and any additional information you think it is important

  Advantages and disadvantages of working with multiple tables

Write down the advantages and disadvantages of working with multiple tables? Write an example of situation where multiple tables would be suitable in the application.

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