In: Computer Science
Using the various Object Oriented Programming concepts and
skills learnt in this course, design and develop a Java Application
to compute an individual student’s GPA and store the records in a
database.
The application should have two components i.e. The student and the
course components.
The following should be the minimal operations on the course
component:
– Set course information
– Print course information
– Show credit hours
– Show course number
The following should be the minimal operations on the student
component
– Set student information
– Print student information
– Calculate number of credit hours taken
– Calculate GPA
– Calculate billing amount (NB: @credit unit is Ksh5,550)
– Sort the courses according to the course number
Answer : Given data
import java.io.*;
import java.util;
class student
{
public static void main(String[] args)
{
//setting the course information
public void course()
{
//get all the necesary information from the usre
//store all the information in proper datatypes
}
public void printcourse()
{
//print all the course information
}
public int creditHours()
{
//return the credit hours
}
public int courseNumber()
{
//return the course number
}
//CALLING THE PREVIOUSLY DEFINED METHODS
int ch=creditHours();
int cn=courseNumber();
//FOR THE STUDENT COMPONENT
public void stuInfo()
{
//store the student information in proper datatype
}
public void printStuInfo()
{
//print the student info
}
public int credit()
{
//calculating the number of credit hours
}
public void GPA()
{
//calculate gpa
//print gpa
}
public float bill()
{
//calculate and return billing amount
}
public void sortCourse()
{
//sort the course according to the course number
}
//CALLING THE NON VOID METHODS
float b=bill();
//b can be used as the billing amount
}//closing main
}//closing class
____________-THE END________________