Question: Instructions You are required to complete the code shown below that demonstrate the use of methods. The aim of the program is to display different

 Instructions You are required to complete the code shown below that
demonstrate the use of methods. The aim of the program is to
display different shapes depending on the user's request. List of the program

Instructions You are required to complete the code shown below that demonstrate the use of methods. The aim of the program is to display different shapes depending on the user's request. List of the program is shown below and you are required to implement the following methods: printSquare, printTriangle, and printDiamond The program listed below can be downloaded from Blackboard PS: The program gives an error due to reading a character after the integer. Hence, you need to fix this part as part of your lab Following the list of the program you can see sample output that assist you in implementing the methods import java.util.Scanner public class LabTwo publie statie void main(String arga) Scanner input- new Scanner System.in) promptUser) int x input . next Int(); printMenu) char option input. nextLine().charAt(0); switch option) case S' case s printSquarex) break; case T case t': printTriangle(' *, x) ; break

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 Databases Questions!