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

Do you have any specific java coding questions? Your questions seem to be looking for someone to write code for you instead of asking how to do something in java.

No I am very much a newb to programming and if you can give me the codes for the functions I require that would be awesome, I need help in some way to seperate the assingment marks and exam marks so it shows for example if I get 40 marks (which is minimum to pass) on assingment and 30 on exam, then it should say that the user needs to retake exam only.
Another thing is I need to allow the program to input students and delete them, after these 2 main problems i'll just need some sort of 2nd class to meet the minimum criteria such as a tester class if you could help me make that as well would be awesome.
Hope you could help thanks.

So the things I need the program to do which isn't at the moment are:

1) Add and delete the Students
2) Should tell me if I will need to retake assingment or exam or both minimum pass marks being 40 so for example if I get 40 marks (which is minimum to pass) on assingment and 30 on exam then it should say that the student needs to retake exam only. etc
3) Then to make a 2nd class such as a tester

You will need a way for the user to enter his option: add/remove
For add you need to get the info to build a Student record.
For remove you need an id for the Student record to remove
The Student records need to be stored in a list that can be searched

Ok, if its possible for you to make that code for me to input inside my software would be greats since I have no idea how I can do it.

commented: doh +0

Sorry, it's up to you to write the code for your program. If you are interested in learning how to program, that will be the best way for you to learn.
If you are having problems with your code, post it and show the problems and ask some questions.

Or you can give me the necessary codes I need and explain them to me and thus i'll learn them in the process =P

commented: Or not. This isn't a homework completion service. +0

Try doing the requirements one at a time.
1) add a student.
What do you need for information to add a student? Where will you get it? Where will you save that info so you can use it later?

To store the name, Assingment marks, and Exam marks. After those are entered I want to be able to add another Student

Instead of the program clossing

The program does work but just like I said closes after one set of record is added

Please reply with answer as soon as possible please, thanks.

Further your knowledge, research this term: data structure

Learn the principles and apply them; this is very basic programming knowledge. Make sure you don't get lost in the more advanced topics, though. Stick with the simpler techniques for now.

closes after one set of record is added

Make a loop that continues executing until the user enters some code telling the program to exit the loop.

I do not have much time to research. I know its kind of bad asking for the codes straight up but I am running out of time. hope you understand

commented: if you know it is wring, don't do it - have some self-respect man +0

Perhaps you should hire a programmer to do your work. I'm not here to help students cheat.

Sorry but more than half of the posts i've been looking at had people sharring there codes helping them out

commented: doesn't make it right though, does it? +0

And so I thought my problem would be a piece of cake for an expert or intermediate level java programmer and thus just taking them few minutes to do

commented: lazy -2

syed,
Helping is one thing. Asking others to just give you the code is something else entirely. You don't seem to be putting any effort into this. Even the original piece of code you posted was copied from elsewhere.

Students are expected to make an effort if they wish to receive help here. Norm's already given you some advice on how to proceed. If you won't bother to try to follow it, then you're probably just out of luck.

commented: absolutely correct, of course :) +11

That is probably true. I'm here to help people learn to program, not to do their homework.
You learn more by actively trying to write code. Copy and paste does not teach programming. Obviously you are not interested in learning.

How should I create the loop, if you could help me create it then I will much appreciate it

What kind of loop do you want to make?
for or while

Which would be best to allow the program to keep on adding different student records untill I hit the Cancel button

Could I implement something like this in a new class, some how use it with my user interface input system?

import java.util.Scanner;
public class Main extends Student

{
public static void main(String[]args)
{

Student firstBlock = new Student();
Scanner sc = new Scanner(System.in);
int selection;

do{
System.out.println("\tMenu");
System.out.println("1.Add Students");
System.out.println("2.Add Grades");
System.out.println("3.Remove Students");
System.out.println("4.Remove Grades");
System.out.println("5.Exit");
selection = sc.nextInt();
if(selection == 1){
}
if(selection == 2){
}
}while(selection != 5);
}
}

The code you have posted looks like a standalone program. When executed it will prompt the user for input and use that input to select some code to execute with a series of if statements. You need to add some code in each of the if statements to do some ueeful work.

What happens when you compile and execute the code?

It ignores this class so nothing happens, if this isn't right or wouldn't work then what do you suggest

The Main class you posted looks ike it should compile and execute.
Does it compile without errors?
What happens when you execute it?
What is the commandline used when the class is executed?
Is it this:
java Main

Says "cannot find symbol class Student", when I compile it by itself.

import java.util.Scanner;

public class Main

{
public static void main(String[]args)
{

Student firstBlock = new Student();
Scanner sc = new Scanner(System.in);
int selection;

do{
System.out.println("\tMenu");
System.out.println("1.Add Students");
System.out.println("2.Add Grades");
System.out.println("3.Remove Students");
System.out.println("4.Remove Grades");
System.out.println("5.Exit");
selection = sc.nextInt();
if(selection == 1){
}
if(selection == 2){
}
}while(selection != 5);
}
}

This is what happened after I took out "extend Student", but had both classes

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.