1. Do Temperature Project, which is Project 7 (3rd, 2nd ed.) or Project 3 (1st ed.). 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 degrees if no value is specified and Celsius if no scale is specified), one with two parameter for the two instance variable, and a no-argument constructor (set to zero degrees Celsius). Include the following:
Write a program to implement a method that can check whether 2 fractions are equal. You will implement a class called Fraction consisting of a numerator and a denominator. The equality test of 2 fractions should return a boolean value.
Write a program to implement a method that can do additions of 2 fractions. You will implement a class called Fraction consisting of a numerator and a denominator.
The additions of 2 fractions should be equal to a fraction. Hints: Fraction f1, f2; f1.add(f2);
Define a class called Counter whose objects count things. An object of this class records a count that is a nonnegative integer. Include methods to set the counter to 0, to increase the count by 1, and to decrease the count by 1. Include an accessor method that returns the current count value and a method that outputs the count to the screen. Write a program to test
In Display 4.7, if the method setDate has the parameter as setDate(int month, int day, int year), what kind of changes should be made in its body of codes?