Click here to Skip to main content
15,895,667 members
Home / Discussions / Java
   

Java

 
AnswerRe: KeyListener - keyPressed delay Pin
max2929725-Dec-08 17:33
max2929725-Dec-08 17:33 
Questionjava nlp project Pin
navasan22-Dec-08 21:03
navasan22-Dec-08 21:03 
AnswerRe: java nlp project Pin
toxcct22-Dec-08 21:36
toxcct22-Dec-08 21:36 
AnswerRe: java nlp project Pin
navasan22-Dec-08 22:30
navasan22-Dec-08 22:30 
Questioncohen sutherland implementation Pin
427748021-Dec-08 12:57
427748021-Dec-08 12:57 
Questionhelp me!...ASAP Pin
ericson045019-Dec-08 23:32
ericson045019-Dec-08 23:32 
AnswerRe: help me!...ASAP Pin
toxcct21-Dec-08 21:59
toxcct21-Dec-08 21:59 
GeneralRe: help me!...ASAP [modified] Pin
code_var26-Dec-08 3:55
code_var26-Dec-08 3:55 
some hint for you..

Try analyzing the Blue print for another code which looks similar

Q1)
student Example :
Create a Student record
a) student id ( string )
b)no of students ( integer )
c) Marks
d) Include appropriate accessors,mutators and constructor(s) as well as a method to change the StudentRecord information.
e) Include a method checkStudentPass which will return true if the student score more than 35 and above in all Subjects otherwise return false.

which means I need to create a class StudentRecord
Here is Similar code

Code:

public class StudentRecord {
String studentID ;
int no_Of_Students ;
int marks;


// need to code for  setter methods for accessing 
// StudentID,Marks and calculate Average marks for a Student. Return 
// using appriate getter methods


public StudentRecord(){
   //Default constructor for StudentRecord.
   // Similarly for a Constructor Member Variables.
}

public boolean checkStudentPass(int marks ){

return (marks >=35 )?TRUE:FALSE;
}



The Q3 acts Vital in your Code.. for which you need to access these variables using objects
All the Parameters are Passed from the main program.
since its the main class
you need to add the main Signature

public class StudentMainClass{

public static void main(String []agrs){
// code
}
}



for Example

StudentRecord studentName1 = new StudentRecord();


Try accessing the StudentID like this
studentName1.studentID


Hope you got some idea about Java and your Q1 and Q3. Smile | :)

The Universe is a Figment of our Imagination.

modified on Friday, December 26, 2008 10:12 AM

GeneralRe: help me!...ASAP Pin
ericson045026-Dec-08 8:01
ericson045026-Dec-08 8:01 
Questionhelp me!...ASAP Pin
ericson045019-Dec-08 23:29
ericson045019-Dec-08 23:29 
AnswerRe: help me!...ASAP Pin
toxcct21-Dec-08 21:57
toxcct21-Dec-08 21:57 
Questionplease solve my problem Pin
im-kyo19-Dec-08 2:59
im-kyo19-Dec-08 2:59 
AnswerRe: please solve my problem Pin
toxcct21-Dec-08 21:57
toxcct21-Dec-08 21:57 
QuestionConnection to mysql database on lan in netbeans ide 6.0 Pin
Vinod Kumar Maurya18-Dec-08 6:37
Vinod Kumar Maurya18-Dec-08 6:37 
Questionproblem in loading a xml file Pin
Areff17-Dec-08 22:14
Areff17-Dec-08 22:14 
AnswerRe: problem in loading a xml file Pin
Naruki23-Dec-08 17:32
Naruki23-Dec-08 17:32 
Questionmouseover menu Pin
m-masood16-Dec-08 4:10
m-masood16-Dec-08 4:10 
AnswerJava is not Javascript! Pin
Naruki23-Dec-08 17:30
Naruki23-Dec-08 17:30 
Questionj2me Pin
eng_maioia15-Dec-08 12:56
eng_maioia15-Dec-08 12:56 
AnswerRe: j2me Pin
Hamid_RT28-Dec-08 4:50
Hamid_RT28-Dec-08 4:50 
QuestionCell Phone Programming with JAVA.... Pin
ZarrinPour15-Dec-08 6:14
ZarrinPour15-Dec-08 6:14 
QuestionNeed peer-to-peer voice chat project Pin
vadali_sudheer12-Dec-08 8:24
vadali_sudheer12-Dec-08 8:24 
AnswerRe: Need peer-to-peer voice chat project Pin
Expert Coming14-Dec-08 12:29
Expert Coming14-Dec-08 12:29 
QuestionDevelopment IDE Pin
Muhammad Nauman Yousuf11-Dec-08 23:34
Muhammad Nauman Yousuf11-Dec-08 23:34 
AnswerRe: Development IDE Pin
Expert Coming14-Dec-08 12:27
Expert Coming14-Dec-08 12:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.