i'm completely new to java, i am reading this java book for my introduction to programming course and i'm only on chapter 3 (week 3 of class) I'm using jGRASP and when i compile it can't find my main method and when i put in the public static void main(String[] args), I get a bunch of errors in my public and private areas.
import java.util.*;
class Checkup
{
private int patNum; //Patient Number
private int systolic; // Systolic blood pressure
private int diastolic; // Diastolic blood pressure
private int LDL; // LDL cholesteral
private int HDL; // HDL cholesteral
// START patNum set and get.
public void setpatNum(int Num)
{
patNum = Num;
}
public int getpatNum()
{
return patNum;
}
// START systolic set and get.
public void setsystolic(int sys)
{
systolic = sys;
}
public int getsystolic()
{
return systolic;
}
//START diastolic set and get
public void setdiastolic(int dia)
{
diastolic = dia;
}
public int getdiastolic()
{
return diastolic;
}
//START diastolic set and get
public void setLDL(int Lchol)
{
LDL = Lchol;
}
public int getLDL()
{
return LDL;
}
}
Aucun commentaire:
Enregistrer un commentaire