In your textbook, this homework problem is in section 2.20 Homework 2-1.
Write a program that asks the user for three integers (firstInt, secondInt, thirdInt), perform the following operations and output the results:
Your prompt to the user to enter the integers must be:
Enter firstInt: Enter secondtInt: Enter thirdInt:
Your output must be of the format:
First result = firstResult Second result = secondResult Third result = thirdResult
Please note that your class should be named IntegerExpressions.
In your textbook, this homework problem is in section 2.21 Homework 2-2.
Write a program that asks the user for time in days and prints the number of years and days (assume that there are 365 days in a year). Note that you should use "years" and "days" for all outputs (even in the cases where it is grammatically incorrect).
For example:
If the user entered: 367, your program would output: 1 years and 2 days. If the user entered: 750, your program would output: 2 years and 20 days If the user entered, 1000, your program would output, 2 years and 270 days.
Your prompt to the user to enter the number of days must be:
Enter number of days:
Your output must be of the format:
numYears years and numDays days.
Please note that your class should be named YearsAndDays.
In your textbook, this homework problem is in section 2.22 Homework 2-3.
Write a program that prompts the user for a double value representing a radius. You will use the radius to calculate:
Circumference of a circle with that radius (circleCircumference = ) Area of a circle with that radius (circleArea = ) Area of a sphere with that radius (sphereArea = ) Volume of a sphere with that radius (sphereVolume = ) You may assume that π = 3.1415926
Your prompt to the user to enter the number of days must be:
Enter radius:
Your output must be of the format:
Circle Circumference = circleCircumference Circle Area = circleArea Sphere Area = sphereArea Sphere Volume = sphereVolume
Please note that your class should be named CircleSphere.
Please submit the completed assignment in the corresponding section(s) in your textbook Lehman College City University of New York CMP 167 Spring 2016: Programming in Java. No other forms of submission will be accepted.