Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: URGENT: help with program (eclipse)

  1. #1
    Junior Member
    Join Date
    Apr 2013
    Thanked 0 Times in 0 Posts

    Exclamation URGENT: help with program (eclipse)


    help? i got the vague idea but i cant put it as a program.

    My program so far

    import java.util.*;
    public class HanLee_Thermostat {

    public static void main(String[] args) {
    double temp=setTarget();
    double change=tempDrift();
    int val= setNumSimulations();
    double initial=temp;
    String status;

    public static String display(double temp, double initial, double change, int val, String status){
    for(int i=0; i<=val; i++){
    System.out.println( initial+ "degrees F");
    System.out.print("Currently running: " + status);



    public static double setTarget(){
    Scanner key=new Scanner(System.in);
    System.out.print("Enter desired temperature: ");
    double temp=key.nextDouble();

    return temp;

    public static int setNumSimulations(){
    Scanner key=new Scanner(System.in);
    System.out.print("Enter desired number of simulated intervals: ");
    int inter=key.nextInt();
    return inter;


    public static double checkSystem(double tartemp){
    double curtemp= tartemp;


    public static double tempDrift(){
    Random generator=new Random();
    double change=generator.nextDouble()*3;
    return change;

    public void displaySummary(){
    System.out.print("Summary Data");



  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    My Mood
    Thanked 263 Times in 232 Posts

    Default Re: URGENT: help with program (eclipse)

    Hi nanairo and welcome to the forum.

    Please edit your post and wrap your code with code tags:
    to get highlighting and preserve formatting.

    If you have a question please post it with your code and the full text of any error messages you may have.

Similar Threads

  1. Program to calculate pay and total sum with daily increment. Urgent!
    By ePerKar3 in forum What's Wrong With My Code?
    Replies: 11
    Last Post: December 5th, 2011, 12:20 PM
  2. Need urgent help regarding java word wrap function.. URGENT
    By coldice in forum What's Wrong With My Code?
    Replies: 3
    Last Post: August 16th, 2011, 05:43 AM
  3. In eclipse how do you get the runtime of your program?
    By beginnerprogrammer in forum Java Theory & Questions
    Replies: 5
    Last Post: May 22nd, 2011, 03:19 PM
  4. (URGENT) Plz help me with the black jack program.
    By diogo in forum What's Wrong With My Code?
    Replies: 2
    Last Post: April 4th, 2011, 04:08 AM
  5. Need a program using only for loop its urgent
    By pokuri in forum Object Oriented Programming
    Replies: 2
    Last Post: January 14th, 2011, 04:13 AM

Tags for this Thread