Assignment1.java - Name William Forbes Title Assignment2.java Description Comparing Strings For CSE 110 Assignment#2 Time Spent 110 minutes Part 1

Assignment1.java - Name William Forbes Title...

This preview shows page 1 - 2 out of 2 pages.

//*********************************************************** // Name: William Forbes // Title: Assignment2.java // Description: Comparing Strings // For: CSE 110 - Assignment #2 // Time Spent: 110 minutes // Part 1 Answers // a)This change caused an error because tempConverter has not been declared as a public class. // b)This change caused two errors. One because of the unclosed string and another because there should // b)been an (') if this wasn't a string. // c)This change caused an error because there wasn't a semiocolon to signal the end of the statement. // d)This change cause an error because the last brace signals the end of the class. // e)This change caused an error because the compiler couldn't find a variable "fahrenheit". // Part 2 Answers // 1a)Mystery has the value of 5 // 1b)Mystery has the value of 2 // 1c)Mystery has the value of 3 // 2a)0 b)3.33333 c)2 d)4.03 e)0.24806 f)1 g)1 // Part 3 Programming //Insert objects for scanner and number format import java.util.Scanner; import java.text.NumberFormat; public class Assignment1
Image of page 1
Image of page 2

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture