This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Java help, please!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java help, please!!!" Watch "Java help, please!!!" New topic
Author

Java help, please!!!

Stephen Norris
Ranch Hand

Joined: Oct 27, 2003
Posts: 44
My assignment says to create a class file called Student which will contain fName, lName, SSN. I then have to create a default contructor which initializes all variables. Then it says to create a non-default contructor which takes fName, lName and SSN as the argument. The class should also contain a boolean variable called admitted, which shows the admission status of the student. The get and set methods of fName, lName, SSN, and admitted should be created.
Then create a class called MBAstudent. This class has two variables: gpa and gmat, and inherits from Student. Create a default constructor and a non-default constructor. The class should have a method to check if the input for first name and last name is valid, for example, it should be a string with length greater than zero.
The method checkQualification returns true if gpa is greater or equal 3.0 and gmat is greater than or equal 550. If gpa or gmat is not provided, admitted will have a false value. Create all needed get and set methods for this class as well. The range: 0<=gpa<=4.0, 0<=gmat<=800.
Create an implementation class called MBAstatus. This could use Label, TextField, TextArea, or JOptionPane components that get the first name, last name, social security number, gpa, and gmat, and uses them to create a student object, and gets its admitted status and shows it back to the user. Include the following functions: 1. For getting the information from the user, to create the MBAstudent object, and to determine the admitted status and to put it back to the screen. 2. For clearing the TextFields and TextArea if used.
Stephen Norris
Ranch Hand

Joined: Oct 27, 2003
Posts: 44
I am not asking anyone to do my program, I just was hoping that someone could help explain or even help with getting me started.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
My assignment says to create a class file called Student which will contain fName, lName, SSN. I then have to create a default contructor which initializes all variables. Then it says to create a non-default contructor which takes fName, lName and SSN as the argument. ...



What are you having trouble with? Tell us what you've done so far. Is your system set up? Can you compile and run a HelloWorld-type program? Do you understand the terminology of the assignment? Do you know how to construct a constructor? Do you know how to initialize a variable? Have you written any code at all? What do you need explained? Please be a little more specific.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java help, please!!!
 
Similar Threads
Compile error
can someone help???
possible help, if you have the time ;-(
Still not getting working of compareTo() method
program error