Question: Ensure all class and method names are exactly what l ask for. Create a class called AssignmentFour. Use it for this whole assignment. Create a

Ensure all class and method names are exactly what l ask for.
Create a class called AssignmentFour. Use it for this whole assignment.
Create a method called whatTypeOfPedalCycle()
The method should take an int.
The method should return a String based on the int that was provided. If the int is 1, return
"unicycle", if the int is 2 return "bicyclep, and if the int is 3 return "tricycle".
If the int is anything else, return "error".
Solve this problem using any conditional structure of your choice.
Use the method in your main method at least 5 times: proving that 0 is error, 1 is unicycle, 2 is
bicycle, 3 is tricycle, and 4 is error. Remember that the sysouts should be in the main method,
not in whatTypeOfPedalCycle()!
Slide 3-40
Implement a method isPass (int grade).
The method takes an int and returns a boolean.
If the int is greater than or equal to 70, return true.
If not, return false.
Use 1 ternary operation for this method.
Use the isPass() method in your main method at least twice to demonstrate one true and one
false example.
Slide 3-40
Implement a method isPass (int grade).
The method takes an int and returns a boolean.
If the int is greater than or equal to 70, return true.
If not, return false.
Use 1 ternary operation for this method.
Use the isPass() method in your main method at least twice to demonstrate one true and one
false example.
Slides 3-46 to 3-59
Implement a method printPay(double wage, int hours).
It takes a wage in the form of a double (like 17.50) and hours worked as int.
Use printf to output the wage, hours paid, and total pay in the following
format:
$17.50xx5=$87.50
The dollar signs are strings, the x" is a string, and the = or is a
string.
The 17.50 is the double wage to 2 decimal spaces (%.2f), the 5 is the hours as
an integer (%d), and the 87.50 ils hours * wage, also as a double (%.2f).
Remember that this is a method. It takes variables. None of those numbers are
fixed. The only fixed parts are the strings mentioned. Everything else is
variable.
Use it in your main method at least once.
Part 1-3 points
Part 2-4 points
Part 3-3 points
Please use java
Ensure all class and method names are exactly

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!