Question: Part 1: In this assignment, you'll be creating up to 5 stories to use specific methods and then implementing the code. Choose methods from the

 Part 1: In this assignment, you'll be creating up to 5stories to use specific methods and then implementing the code. Choose methods

Part 1: In this assignment, you'll be creating up to 5 stories to use specific methods and then implementing the code. Choose methods from the lists below to describe an example of when it would be efficient and effective, and then implement the code to solve the problem. You can use 2 or more methods in 1 story if you wish. For example, one story may use exp(), pow(), and toUpperCase(), which fulfills the math and char requirements. You will make up stories for 2 Math class methods, 1 Character class method, and 2 String methods. See details in Chapter 4 of the textbook. Part 2: answer the 3 questions at the bottom of this assignment using information in the textbook. Part 1: For example, use the following model to demonstrate the random() method in the Math class. Be sure to use comments to make up your story. Your project should follow this pattern: // I will demo Math.random() with the following story: System.out.println("In the Powerball lottery, 5 random numbers are chosen " + "between 1 and 69, inclusive, as white balls and 1 random " + "number is chosen between 1 and 26, inclusive, as the red ball. (n"); // get 5 random numbers for white balls int min=1,max=69; System.out.print("White balls: "); System.out.print(min + (int) (Math. random()max)+, ,"); System.out.print(min + (int) (Math.random () * max) + ","); System.out.print(min + (int) (Math.random () * max) + ", "); System.out.print(min + (int) (Math.random () * max) + ", "); System.out.print(min + (int) (Math.random()* max)); // get 1 random number for red Powerball max=26; System.out.print(" Powerball: "); System.out.println(min + (int) (Math. random()max)); System.out.println(" "); Chararter mothnds - rroato a ctoni for 1 of theco mothndc. Part 2: Answer the following 3 questions in your own words from information in the textbook: 1. Do the Math, Character, and String classes need to be imported? Why or why not? 2. Why is an escape sequence necessary? Which char is the escape character? 3. Why would you use println vs print vs printf methods? *NOTE: for those already familiar with Java programming, please keep this simple: no loops, no methods, no arrays, nothing fancy. You must use only the concepts discussed through Chapter 4 and concepts presented in the jar files up to this point

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!