User Profile

Collapse

Profile Sidebar

Collapse
amistak
amistak
Last Activity: Mar 18 '10, 03:39 PM
Joined: Mar 18 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • amistak
    replied to Extremely Confusing Prompt from instructor.
    in Java
    Wont I need to declare more things in my contructor and instance variables if I am going to compare more than one temperature?
    See more | Go to post

    Leave a comment:


  • amistak
    replied to Extremely Confusing Prompt from instructor.
    in Java
    Code:
    public class Temp
    {
    double temperature = 0;
    String Scale = " ";
    
        /**
         * Constructor for objects of class Temp
         */
        public Temp(double x,String b)
        {
            temperature = x;
            Scale = "a";
        }
        public Temp()
        {
            temperature = 0;
            Scale = " ";
        }
        public double
    ...
    See more | Go to post
    Last edited by Frinavale; Mar 18 '10, 08:31 PM. Reason: Changed quote tags into code tags.

    Leave a comment:


  • amistak
    started a topic Extremely Confusing Prompt from instructor.
    in Java

    Extremely Confusing Prompt from instructor.

    So my teacher wants us to write the following program:
    "2. Write a Temperature class that has two instance variables: a temperature value ( a floating-point number) and a character for the scale, either C for Celsius or F for Fahrenheit. The class should have four constructor methods: one for each instance variable (assume zero degree if no value is specified and Celsius if no scale is specified), one with two parameters for the two...
    See more | Go to post
No activity results to display
Show More
Working...