Student.javaWrite a program that stores 5 grades. The program should also store t
Page 1 of 1
14 Replies - 5443 Views - Last Post: 13 February 2009 - 02:11 PM
#1
Student.java
Posted 12 February 2009 - 03:31 PM
Replies To: Student.java
#3
Re: Student.java
Posted 12 February 2009 - 04:23 PM
#4
Re: Student.java
Posted 12 February 2009 - 04:47 PM
mostyfriedman, on 12 Feb, 2009 - 03:23 PM, said:
public class Student {
private String first; // first name
private String last; // last name
private String email; // email address
private int section; // section number
// construct a new student with given fields
public Student(String first, String last, String email, int section) {
this.first = first;
this.last = last;
this.email = email;
this.section = section;
}
}
#5
Re: Student.java
Posted 12 February 2009 - 05:01 PM
#6
Re: Student.java
Posted 12 February 2009 - 05:07 PM
#7
Re: Student.java
Posted 12 February 2009 - 05:08 PM
#8
Re: Student.java
Posted 12 February 2009 - 05:18 PM
#9
Re: Student.java
Posted 12 February 2009 - 05:30 PM
public class Student {
private String first; // first name
private String last; // last name
private String email; // email address
private int section; // section number
// construct a new student with given fields
public Student(String first, String last, String email, int section) {
this.first = first;
this.last = last;
this.email = email;
this.section = section;
}
public static void main(String[]args)
{
Student s1 = new Student(/*your values here*/);
}
}
This post has been edited by mostyfriedman: 12 February 2009 - 05:31 PM
#10
Re: Student.java
Posted 12 February 2009 - 05:35 PM
mostyfriedman, on 12 Feb, 2009 - 04:30 PM, said:
public class Student {
private String first; // first name
private String last; // last name
private String email; // email address
private int section; // section number
// construct a new student with given fields
public Student(String first, String last, String email, int section) {
this.first = first;
this.last = last;
this.email = email;
this.section = section;
}
public static void main(String[]args)
{
Student s1 = new Student(/*your values here*/);
}
}
public static void main(String[]args)
{
Student s1 = new Student(/*your values here*/);
}
}
so i just add that to my student class and it will work?
#11
Re: Student.java
Posted 12 February 2009 - 05:38 PM
#12
Re: Student.java
Posted 12 February 2009 - 05:42 PM
mostyfriedman, on 12 Feb, 2009 - 04:38 PM, said:
i would really appreciate any hel p that i can get the only method that i know is the get method but i dont know how that would apply to a students name first name on one line and last name below it and sotreing 5 variables that are grades
#13
Re: Student.java
Posted 12 February 2009 - 05:45 PM
#14
Re: Student.java
Posted 12 February 2009 - 05:59 PM
#15
Re: Student.java
Posted 13 February 2009 - 02:11 PM
http://java.sun.com/...lts/arrays.html
This post has been edited by johnmalloy: 13 February 2009 - 02:12 PM

New Topic/Question
Reply



MultiQuote





|