introduction to programming :: problem set 1

  1. Write the class Rectangle. This class will find the area and perimeter of a rectangle. Use the following values to answer this question: width is 4 and lenght 7.1
  2. Write the class Address. This class will output the following data in the form of an address: your first name, last name, street and number, city, province and postal code:

    First name, last name
    number street name
    city, province
    postal code

  3. Write the class CelsiusConverter. This class will convert a value representing degrees in Fahrenheit into Celsius. To accomplish this use the formula:
    celsius = (fahrenheit - 32) * 5/9

    Initialize fahrenheit with the value of 68.

For answers click here