Computer |coding java script

Computer |coding java script

14 points Use file Prob11.java The following static method named drawFigure is supposed to produce the following output: ////////////////\\\\\\\\\\\\\\\\ ////////////********\\\\\\\\\\\\ ////////****************\\\\\\\\ ////************************\\\\ ******************************** static void drawFigure() { for (int line = 1; line <= 5; line++) { for (int i = 1; missing Java code ) { System.out.print(“/”); } for (int i = 1; missing Java code) { System.out.print(“*”); } for (int i = 1; missing Java code) { System.out.print(“\\”); } System.out.println(); } } Unfortunately, there are 3 for loops that contain missing Java code. You need to fill in those missing expressions, and then include the completed drawFigure method in a file that contains a main program that calls on the method so that the pattern is output. You may only add code where it says “missing Java code”, i.e., in the test and increment sections of the for loops. [12] 8 points Use file DooBee.java Write a Java program containing a for loop to print the message Na na na na na na na na na na na [13] 10 points Use file Pattern.java Write a complete Java program to output the pattern ***** **** *** ** * Your program should define the following “constant” to control how many lines get output: final int HEIGHT = 5; Thus if HEIGHT were set equal to 7 instead of 5, the output would look like this: ******* ****** ***** **** *** ** * [14] 10 points Use file Complexity.java Consider the following Java method that outputs four times a quote from a famous computer scientist named Brian Kernighan: static void print4x() { System.out.println (“Controlling complexity is the essence of programming!”); System.out.println (“Controlling complexity is the essence of programming!”); System.out.println (“Controlling complexity is the essence of programming!”); System.out.println (“Controlling complexity is the essence of programming!”); } Use this print4x method in a complete Java program that outputs the Kernighan quote 64 times. Your solution must contain a main method, the print4x method, and at least one additional method. You should not use any for loops or while loops or anything like that — just method calls! [15] 15 points Use file Drawing.java Write a method named top() that draws this figure (there are precisely 7 underscore characters in the top line): ________ / \ / \ Now write a method named bottom() that draws this figure: \ / \________/ Finally, define a main method that uses the top() and bottom() methods (along with any additional methods you might like) to output the following sequence: _______ / \ / \ \ / \_______/ -“-‘-“-‘-“- _______ / \ / \ \ / \_______/ -“-‘-“-‘-“- \ / \_______/ _______ / \ / \ -“-‘-“-‘-“- \ / \_______/

Project does not have any attached files

Order from us and get better grades. We are the service you have been looking for.