[hotjoe.com] HotJoe Java Help Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Visit java.com
Please send email if you are having login problems - see the posts below for more info.
Hotmail and Yahoo! users - please see the Hotmail post or the Yahoo! post for information on lost emails.
need some help  XML
Forum Index » New to Java
Author Message
groucho

Newbie
[Avatar]

Joined: 10/25/2009 09:56:40
Messages: 3
Offline

// below is my first program with more than one method am having trouble debugging it though. I am new to both programming and java. any help is appreciated.




import java.util.Scanner;

public class checkup
{
private int patientNumber;
private int bloodPressSys;
private int bloodPressDia;
private int ldl;
private int hdl;

public static void main (String[] args)
{
int patientNumber;
int bloodPressSys;
int bloodPressDia;
int ldl;
int hdl;
Scanner inputDevice = new Scanner (System.in);

System.out.print("Please enter a patient number: " );
patientNumber = inputDevice.nextInt();
System.out.print("Please enter patient's Systolic Blood Pressure: " );
bloodPressSys = inputDevice.nextInt();
System.out.print("Please enter patient's Diastolic Blood Pressure: " );
bloodPressDia = inputDevice.nextInt();
System.out.print("Please enter patient's LDL Cholesterol: " );
ldl = inputDevice.nextInt();
System.out.print("Please enter patient's HDL Cholesterol: " );
hdl = inputDevice.nextInt();
}
public static double computeRatio (String[] args)
{
double computeRatio;
computeRatio = (ldl % hdl);
return computeRatio;
}

public static void explainRatio ()
{
System.out.println (" HDL is known as Good Cholesterol. Any ratio of 3.5 or lower is considered optimum. ");
}


public static double patientInfo (String[] args)
{
System.out.println("Patient number is " + patientNumber +
" Systolic Blood Pressure is " + bloodPressSys +
" Diastolic Blood Pressure is " + bloodPressDia +
" Cholesterol number is " + computeRatio + explainRatio);
}
}


Programming + java noob

need help learning concepts thanks for your patience

stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 849
Location: Superior, CO, USA
Offline

I'm not sure what you need help with. Is the program crashing? Does it give some sort of error? Does it melt your computer?

Let us know what the problem is and we're much more likely to be able to help.

Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
sanjayaryan

Newbie

Joined: 03/19/2010 00:15:48
Messages: 1
Offline

क्या ज-फोरम हिंदी सुप्पोर्ट करता है?
 
Forum Index » New to Java
Go to:   
Powered by JForum 2.1.9 © JForum Team
This site run by Scott Dunbar of Xigole Systems. © 2005-2011 - Scott Dunbar
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners
hotjoe.com, xigole.com, and Scott Dunbar have no affiliation with Oracle