Class Declarations for temperature program in Java

You need a Temperature class. I’m just guessing that you’ve added those methods to the TempProg considering the improper “constructor”. What you need is another class all together like so…

public class Temperature {
  // Put those method and data members here
}

The constructor should not return a value. It should look like… public Temperature(), or some variation depending on your specific requirements.

Leave a Comment