Question: /* Problem 1 * Write and run a java program that prints out two things you have learned * so far in this class, and
/* Problem 1 * Write and run a java program that prints out two things you have learned * so far in this class, and three things you hope to learn, all in different lines. */ You could write any two basic things in Java. /* Problem 2 * The formula for finding the area of a triangle is 1/2 (Base * height). * The formula for finding the perimeter of a rectangle is 2(length * width). * Write a program that prompts the user to enter the base and height of a triangle. * The program then calculates the area of the triangle. * The program also prompts the user to enter the length and width of a rectangle. * The program then calculates the perimeter of the rectangle. * Your code must print out: the base of the triangle, the width of the triangle, the area * of the triangle, the length of the rectangle, the width of the rectangle, and the area of the rectangle. * (5 Points.) */ /* Problem 3 * Write and run a java program that prompts you to enter your year of birth. * The program then returns your age by subtracting your year of birth from the * current year. The program must print: You are x years old, where x is your * age. You must import the scanner class (5 Points.) /* Problem 4 * Write a java program that asks the user to enter her\his first name, * middle initial, last name, class name, letter grade, and GPA. * The program then prints out the above items as follows. * Line 1: Your name is first name, middle initial, last name. * Line 2: You are enrolled in class name * Line 3: You scored letter grade ... in class name * Line 4: Your GPA in class name is GPA * Hint: To read characters from the scanner, you should use this syntax: * String firstName = input.nextLine(); * Note that you will use both String and double variable types.
* Note that we use Notepad ++ in our class for java and we also use cmd
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
