QUESTION
Java using Eclipse IDE for Java developers
Assignment 4
Before attempting this project, be sure you have completed all of the reading assignments, non-graded exercises, discussions, and assignments to date.
(1) Write Java code to prompts user for number of rows (e.g. 6) and output the triangle pattern below. Use nested for-loops.
#
# #
# # #
# # # #
# # # # #
# # # # # #
(2) Write Java code to prompt user for side length (e.g. 6) and output diamond pattern below: Use nested for-loops.
#
# # #
# # # # #
# # # # # # #
# # # # # # # # #
# # # # # # # # # # #
# # # # # # # # #
# # # # # # #
# # # # #
# # #
#
Hint: Check out practice exercise 3 in class materials.
Make sure your Java program is using the recommended style such as:
Javadoc comment up front with your name as author, date, and brief purpose of the program
Comments for variables and blocks of code to describe major functionality
Meaningful variable names and prompts
Identifiers are written in upper CamelCase
Class name starts with upper case letter and variables in lower case letter
Constants are written in All Capitals
Use proper spacing and empty lines to make code human readable
Capture execution:
You should capture and label screen captures associated with compiling your code, and running a couple of different inputs for each program.
Submission requirements
Deliverables include Java program(s) (.java) and a single Word (or PDF) document. You can code both exercises in a single java program or in two separate ones. The Java and Word/PDF files should be named appropriately for the assignment (as indicated in the SubmissionRequirements document.
The word (or PDF) document should include screen captures showing the successful compiling and running of each of the programs. Each screen capture should be properly labeled clearly indicated what the screen capture represents.
Submit your files to Assignment 4 submission area no later than the due date listed in your online classroom.
Grading Rubric:
The following grading rubric will be used to determine your grade: Attribute |
Level (15-20 points) |
Level (5-15 points) |
Level 0 (0 – 5 points) |
Triangle pattern |
Correct or almost correct prompts, for-loops, and code to output pattern |
Mistakes in prompts and/or capture of input and/or loop logic |
Missing or close to missing user input and/or loop logic |
Diamond pattern |
Correct or almost correct prompts, for-loops, and code to output pattern |
Mistakes in prompts and/or capture of input and/or loop logic |
Missing or close to missing user input and/or loop logic |
Application output |
Correct or almost correct output |
Mistakes in output data or format |
Missing or significantly incorrect output |
Screen captures |
Correct or almost correct test cases and test execution |
Mistakes or incomplete test cases and execution |
Missing or significantly incorrect test cases |
Program documentation and style |
Correct or almost correct program comments and identifiers |
Mistakes or incomplete documentation and/or style |
Missing or significantly incorrect documentation and/or style |
Subject | Computer Technology | Pages | 4 | Style | APA |
---|
Answer
TEST CASES Input |
Expected Output |
Actual Output |
Pass? |
triangle rows = 6 |
# ## ### #### ##### ###### |
# ## ### #### ##### ###### |
Yes |
diamond rows=5 |
# ### ##### ####### ######### ####### ##### ### # |
# ### ##### ####### ######### ####### ##### ### # |
Yes |
diamond rows= 10 |
# ## ### #### ##### ###### ####### ######## ######### ########## |
# ## ### #### ##### ###### ####### ######## ######### ########## |
Yes |
triangle rows = 9 |
# ### ##### ####### ######### ########### ############# ############### ################# ############### ############# ########### ######### ####### ##### ### # |
# ### ##### ####### ######### ########### ############# ############### ################# ############### ############# ########### ######### ####### ##### ### # |
References
|
Related Samples
The Role of Essay Writing Services in Online Education: A Comprehensive Analysis
Introduction The...
Write Like a Pro: Effective Strategies for Top-Notch Explication Essays
Introduction "A poem...
How to Conquer Your Exams: Effective Study Strategies for All Learners
Introduction Imagine...
Overcoming Writer’s Block: Strategies to Get Your Essays Flowing
Introduction The...
Optimizing Your Online Learning Experience: Tips and Tricks for Success
The world of education...