ITP 120 hw

Write a class called AssignmentFive with the following methods. All input and output on the command line NO dialog boxes. Remember to use the most efficient logic when you write the program. 

  • main method: do exactly the following, no more and no less
    • say hi from your full name
    • skip a line, say PART ONE, then skip a line
      • call the hotOrColdOutside method
    • skip a line, say PART TWO, then skip a line
      • ask the user what his name is
      • assign the user’s name to variable of type String called myName
      • ask the user what his body temperature is
      • assign the number entered by the user to a variable of type double named myTemperature
      • call the determineFever method, sending it the value of the variables myName and myTemperature
    • skip a line, say PART THREE, then skip a line
      • ask the user what the water temperature is (whole numbers only)
      • assign the number entered by the user to a variable of type int named liquidTemperature
      • call the isBoiling method, sending it the value of the variable liquidTemperature
      • assign the boolean value returned from isBoiling method to a variable named boiling
      • if boiling is true, say “The water is boiling. Be careful.”
      • if boiling is false, say “The water is not boiling. A watched pot never boils.”
    • skip a line, say bye from your full name, then skip a line
  • hotOrColdOutside method
    • this method takes no arguments and has no return value
    • inside this method
      • ask the user what the temperature is outside
      • if it is 80 or above, say “It is very hot outside.”
      • if it is greater than or equal to 60 and less than 80 say “It is very nice outside”
      • if it is below 60 say “It is very cold outside.”
  • determineFever method
    • this method has two parametesr: a String called yourName and a double, named bodyTemperature
    • this method returns nothing
    • this method says “Hello ____, you have a fever. Take some aspirin.” if the value of the variable bodyTemperature is above 98.6
      • Fill in the blank with the value of the variable yourName
    • if the bodyTemperature is less than or equal to 98.6, say “Hello ___, you have no fever. You may go to the movies.”
      • Fill in the blank with the value of the variable yourName
  • isBoiling method
    • this method has one parameter: an int, named waterTemperature
    • this method returns a boolean
    • this method determines if the value of the variable waterTemperature is boiling
      • if the water is boiling, the method returns true
      • if the water is not boiling, the method returns false
    • water boils at 212 (so 212 or greater is boiling)
  • Test your program thoroughly
  • Draw memory for the entire program, showing memory for all variables used
    • use whatever user input you would like
    • Be sure to draw the “chinese wall” between the parts of memory for each method
    • draw memory using the methodology we have been using in class
 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
Looking for a Similar Assignment? Our Experts can help. Use the coupon code SAVE30 to get your first order at 30% off!

Hi there! Click one of our representatives below and we will get back to you as soon as possible.

Chat with us on WhatsApp