Hey guys I need to hand in this assingment and actually made an account for this as I know this is one of the best forums so far that I have came across about programing, so it would be awesome if someone could help me out with this.
So first off my assingment task is:
Task 4
Implement a piece of software that records the marks (coursework and exam) for all
students taking a particular module at UEL. You must invent a name for the module and
this name should be displayed on screen.The software should allow students to be
added and removed to the list and for their marks to be recorded. The system should be
able to produce a final report card for each student indicating the marks recorded and the
overall module decision (pass, fail, retake coursework and so on).
And so far i've done this:
import javax.swing.JOptionPane;
class Student
{
final double ASSIGNMENT_ONE_PERCENTAGE = .50;
final double FINALEXAM_PERCENTAGE = .50;
String name, finalLetterGrade;
int assignmentOne = 0;
int finalExamGrade = 0;
double finalNumericGrade = 0;
public Student() {
System.out.println ("Module JK1337 Computer Processing ...");
}
public void inputGrades() {
name=JOptionPane.showInputDialog("Enter Student's full Name:");
assignmentOne = Integer.parseInt(JOptionPane.showInputDialog( "Enter the Assignment Marks" ));
finalExamGrade = Integer.parseInt(JOptionPane.showInputDialog( "Enter the Final Examination Marks" ));
}
public double getAverage(){
finalNumericGrade =
(assignmentOne * ASSIGNMENT_ONE_PERCENTAGE) +
(finalExamGrade * FINALEXAM_PERCENTAGE);
return finalNumericGrade;
}
private String letterGrade(){
if (finalNumericGrade >= 70)
finalLetterGrade = "Destinction";
else
if ((finalNumericGrade >= 55) & (finalNumericGrade < 70))
finalLetterGrade = "Merit";
else
if ((finalNumericGrade >= 40) & (finalNumericGrade < 55))
finalLetterGrade = "Pass";
else
if (finalNumericGrade < 39)
finalLetterGrade = "Fail";
return finalLetterGrade;
}
public String toString() {
String studentStringValue= " Student Name is: "+name +"\n";
studentStringValue+= " Assignment One grade is: " + assignmentOne + "\n";
studentStringValue+=" Final Exam is: " + finalExamGrade + "\n";
studentStringValue+=" Final Numeric Grade is: " + finalNumericGrade + "\n";
studentStringValue+=" Final Letter Grade is: " + finalLetterGrade +"\n";
return studentStringValue;
}
public void printName(){
System.out.print(" "+name);
}
public static void main(String[] args)
{
Student s = new Student();
s.inputGrades();
System.out.println("Average --> " + s.getAverage());
System.out.println("Letter grade --> " + s.letterGrade());
System.out.println("Student name() --> " + s.toString());
}
}
So what I need help is in same way to seperate the assingment marks and exam marks so it shows for example if I get 40 marks on assingment and 30 on exam, then it should say that the user needs to retake exam. Another thing is I need to allow the program to input students and delete them, after these 2 main problems i'll just need to make some sort of 2nd class to meet the minimum criteria such as a tester class.
Hope you guys could help thanks.
By the way its due on thursday so i'll require help as soon as possible