CSCI-1320 Homework 12: Math Operations

Instructor: Todd Dole

Purpose Statement

This lab assignment provides an opportunity to practice using methods with parameters and return values. You will create several methods to perform basic mathematical operations and conversions.

Instructions

Construct a program that will perform basic mathematical operations, temperature conversion, and circle area calculation, all while utilizing methods with parameters and return values.

Note: You will not need to accept user input for this assignment. Simply enter values into your code yourself.

Part 1: Basic Mathematical Operations

Part 2: Temperature Conversion

Part 3: Geometry Helper

Part 4: Maximum of Three Numbers

Example Output

Math Operations:
Addition: 5 + 3 = 8
Subtraction: 10 - 4 = 6
Multiplication: 7 * 6 = 42
Division: 9 / 3 = 3.0

Enter a temperature in Fahrenheit: 100
100.0 Fahrenheit is 37.77777777777778 Celsius.

Enter the radius of the circle: 5
The area of the circle with radius 5 is 78.53981633974483

Maximum of 3 numbers: 9, 15, 7 = 15
            

Save your class as MathOperations.java and submit it through Canvas. Your methods should be placed inside the class, but outside the main method. Remember to declare all methods as static so that they can be called from main.