+1-415-670-9189
info@expertsmind.com
Create using netbeans
Course:- JAVA Programming
Reference No.:- EM131599404




Assignment Help
Assignment Help >> JAVA Programming

Assignment

Create, using NetBeans, a complete Java program called PatternMakerWithMethods according to the following guidelines.

The program prompts the user for five input values: an integer value between 1 and 10 (inclusive) for the number of rows to be printed, a second integer value between 1 and 10 (inclusive) for the number of columns to be printed, a string value for the starting string of the pattern, a string value for the second string of the pattern, and a string value that separates the first two strings.

The program must use nested for loops to print a rectangular array ofalternatingfirst and second strings of the pattern, separated by the separator string and such that the first string in the first row uses the "first string" provided by the user, buteach subsequent row alternates the starting stringbetween the "second string" the user provided and the "first string" the user provided.
Use methods to accept the user input and to generate the program output. Your main program should consist mostly of just a few method calls and variable assignments.

So, for instance, if the user enters 5 for the number of rows, 7 for the number of columns, and "XX" for the first string, "OO" for the second string, and "***" for the separator, your program should print the following rectangular pattern.
XX***OO***XX***OO***XX***OO***XX
OO***XX***OO***XX***OO***XX***OO
XX***OO***XX***OO***XX***OO***XX
OO***XX***OO***XX***OO***XX***OO
XX***OO***XX***OO***XX***OO***XX
Thoughts
Note the requirement for this program to use nested for loops (Horstmann section 4.3).
Note that there is no delimiter at the end of the lines.

The idea in this program is to effectively "make into methods" the code you wrote for the Programming Assignment 6a. Assuming your code worked for the previous assignment, it should be fairly straightforward to "methodize" it for this assignment




Put your comment
 
Minimize


Ask Question & Get Answers from Experts
Browse some more (JAVA Programming) Materials
Compile and run your program until it works and the output looks nice. Add the necessary documentation as described in Course Documents, and then attach your .java file to t
The basic requirements of this assignment are to implement the client and server components as discussed above. The basic protocol of the system is described below: The oper
The security advantages of using two-factor authentication, such as the integrated fingerprint reader in the more recent iPhone models, particularly to support internet serv
Based on your usability test, what steps will take to update and improve your website? Will you register a domain name and host your website live? If yes, with what host? How
Write a program which adds two matrices together and displays the sum - Two arrays will contain user input, and the third array will be used to contain the sum of the two arra
Design and implement a recursive method findValueUnsortedArray which takes two parameters: an unsorted array of integer values and an integer value which is looked for in th
Modify the Java application using Java NetBeans IDE to meet these additional and changed business requirements. The application will now compare the total annual compensation
What type of equation would you create to determine how much either Joe or Jim makes separately? What equation is needed in Java (ignoring the $ symbol)? What data type is n