Question: Exercise 1: 1. Write a method called cale that takes as parameter three integers. Use the following method header public static void eale (inta, int

 Exercise 1: 1. Write a method called cale that takes as

Exercise 1: 1. Write a method called cale that takes as parameter three integers. Use the following method header public static void eale (inta, int b, int op) If op is 1. it prints the sum of the two numbers If op is 2, it prints the product of the two numbers Otherwise, il prints the following message: "Wrong choice 2. Write a main method that asks the user to enter two integers. It then asks him to enter his option and calls the calc method by passing the three entered numbers as parameters. Sample run 1: Enter two integers Enter your option: [1 for + 2 for 1 1 2446 Sample run 2 : Enter two integets 3 5 Enter your options [1 for + 2 for 3 Wrong choice Enter your option: [1 for + 2 for 1 4 Wrong choice Enter your options 11 for 2 for 2 3.5=15

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!