Click here to Skip to main content
15,886,801 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Q1. Grade Processing System
University grading system maintains a database called “GradeProcessing” that
contains number of tables to store, retrieve and manipulate student
marks. ‘Java2’ is one of the tables which contains following attributes for all the
students enrolled in “Java2”: “ID”, “Name”, “Quiz”, “A1”, “A2”, “Exam”,
“CumulativeMark” and “Grade”. A sample of the table may look like as follows:
ID Name Quiz A1 A2 Exam CumulativeMark Grade
11111111 X 100 85 100 88 90.55 HD
22222222 Y 100 60 80 75 75.00 DI
Write a JAVA Graphical User Interface (GUI) program that would perform
following tasks:
Create Table: Create a table that is capable to store above information.
Insert Record: If the user of your program wants to insert a record, your
program should ask for all the fields of the record and insert them in the
table.
Search: The user of your program should be able to search a particular
record by ID or any other field.
 Update: The user of your program should be able to update any field/s of
a particular record. The record for update operation will be selected by ID.
 Calculate Results: The Cumulative Mark of a student would be calculated
using the following formula: CumulativeMark = (Quiz * 0.05)+(A1* 0.15)
+(A2* 0.2) + (Exam * 0.6)
 Calculate Grade:
HD: CumulativeMark>=85
DI: 75<=CumulativeMark<85
CR: 65<=CumulativeMark<75
PS: 50<=CumulativeMark<65
FL: CumulativeMark<50
Note that, ID must be an 8-digit number, A1, A2, and Exam marks must be between
0 and 100 (inclusive), and CumulativeMark must be floating-point numbers with
two decimal places.
Q2. Assume the participant table is created using the following query,
CREATE TABLE PARTICIPANT (PARTICIPANT_NM VARCHAR(255),
PARTICIPANT_ID INT,MEETING_NM VARCHAR(20),MEETING_DAY
VARCHAR(15))
Write SQL Statements to accomplish the following in a Java Program
1. Determine the names of the columns in the MEETING table, and display
the column names on the console.
2. Write a query to find the names of all participants for the meeting with ID
1144. Display the names on the console, preceded by the message, “Names
of participants in meeting 1144”.
3. Insert a new participant with your name as the participant’s name.
4. Count the number of people participating in the meeting with ID 1105.
5. Display a message on the console that gives both the meeting name and the
number of participants.
6. Determine the names of all people who participate in meetings that meet
on Tuesdays. Display the names, preceded by the message, “Participants
attending Tuesday meetings”.

What I have tried:

I am stuck with Q1 Database creation itself
Posted
Updated 18-Oct-20 3:34am

You can use a database design tool like DBeaver to create the database and tables:
database-design-programs[^]
A lot of databases come with their own tool, e.g. PGAdmin for PostgreSQL.
These tools are also handy for viewing and checking the data generated by your program.
 
Share this answer
 
You have been told what the table you require is called, and what columns it should contain. So work out what datatype those columns should be for starters - Text based data goes in NVARCHAR columns; numeric data in INT, FLOAT, or DECIMAL; and date / time based data in DATE, DATETIME, or DATETIME2 columns.

Then decide what database system you will be using: SqlServer (Also known as MS Sql), MySql, SQLite, and Access are the most common - but it'll depend on what you have available for your target environment. You course notes will help here.

Then create the DB and its table(s) - again, your course notes will help here as the exact software (and how to use it) will be different for each database system and environment.

Then populate your DB with test data. Course notes again!

If your course notes don't cover it, then you need to talk to your tutor: we can't help you with any of that as we have no idea what environment or DB system you are supposed to use!

Good luck!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900