Discount Get CS 520 ALL WEEKS Solution ONLY $154.91
CS520, CIS 520, CIS 520 Week 1 assignment - iLab 1 - Lab 1 - Java... [$8.99]
CS520, CIS 520, CIS 520 Week 2 assignment Part 1 - iLab 2 - Lab 2... [$11.99]
CS520, CIS 520, CIS 520 Week 2 assignment Part 2 - iLab 2 - Lab 2... [$15.99]
CS520, CIS 520, CIS 520 Week 2 assignment Part 3 - iLab 2 - Lab 2... [$19.99]
CS520, CIS 520, CIS 520 Week 3 assignment Part 1 - iLab 3 - Lab 3... [$15.99]
CS520, CIS 520, CIS 520 Week 3 assignment Part 2 - iLab 3 - Lab 3... [$19.99]
CS520, CIS 520, CIS 520 Week 4 assignment Part 1 and Part 2 - iLa... [$21.99]
CS520, CIS 520, CIS 520 Week 5 assignment - iLab 5 - Lab 5 - Java... [$19.99]
CS520, CIS 520, CIS 520 Week 6 assignment - iLab 6 - Lab 6 - Java... [$19.99]
Get Selected Weeks Solution with ONLY NOT Add Selected Tutorials To Cart
CS520, CS 520, CS 520 Week 2 assignment Part 3 - iLab 2 - Lab 2 - Java Programming
    CS520, CS 520, CS 520 Week 2 assignment Part 3 - iLab 2 - Lab 2 - Java Programming

CS520, CS 520, CS 520 Week 2 assignment Part 3 - iLab 2 - Lab 2 - Java Programming

$19.99

You are strongly encouraged to add comments throughout the program. Doing so will help your facilitator to understand your programming logic and grade you more accurately.
You must work on your assignments individually. You are not allowed to copy the answers from the others. However, you are encouraged to discuss approaches to the homework assignment with your section mates and the facilitator in your section via the discussion board.
Each assignment has a strict deadline. However, you are still allowed to submit your assignment within 2 days after the deadline with a penalty. 15% of the credit will be deducted unless you made previous arrangements with your facilitator and professor. Assignments submitted 2 days after the deadline will not be graded.
The assignment solution will be available 48 hours after the assignment deadline.
When the term lastName is referenced in an assignment, please replace it with your last name.
You are strongly encouraged to add comments into your program!
Create a new Java Project in Eclipse named HW2_lastName. Create a package named cs520.hw2 and complete the following three parts by writing the appropriate classes under this package.
Part 3 (40 Points)
Create a Swing GUI application that displays the following graphics of red and black bricks.
 
Write a class named P04_RedAndBlackSteps extending the JFrame class with the following specifications. No loops are to be used in this homework.
Declare the integer type instance variables startX, startY, brickWidth, brickHeight, and brickSpace. The first two values represent the top-left coordinates of the red brick in the first row. The next two values are the width and height of each brick. The last value represents the space between each brick along any direction.
In the constructor, specify the appropriate window title using your lastName and assign the above instance variables with the values 400, 50, 50, 30, and 2, respectively.
In the paint method, declare two local variables named currentX and currentY. Assign the startX and startY variables to these local variables, respectively.
All the fillRect methods in the code should only make use of the variables currentX, currentY, brickWidth, brickHeight, and brickSpace.
 
Draw the contents of the first row. Fill a red rectangle.
Increment currentY for the second row. Decrement currentX to position for the first brick of the second row.
Draw the contents of the second row. Fill a red rectangle, a black rectangle, and a red rectangle.
Increment currentY for the third row. Decrement currentX to position for the first brick of the third row.
Draw the contents of the third row. Fill a red rectangle, three black rectangles, and a red rectangle.
Increment currentY for the fourth row. Decrement currentX to position for the first brick of the fourth row.
Draw the contents of the fourth row. Fill a red rectangle, five black rectangles, and a red rectangle.
Increment currentY for the fifth row. Decrement currentX to position for the first brick of the fifth row.
Draw the contents of the fifth row. Fill a red rectangle, seven black rectangles, and a red rectangle.
In the main method, create the application object, set its size to 800 by 400 and its visibility to true to test the above graphics.

My tutorial contains Java Programs - Eclipse Project and Document.

If you have more questions, please contact me via email support@extutorials.com

I will help you any time

Thank you !

Attached Files

Move over [ preview ] file name to preview content in it!

Write a review

Your Name:


Your Review: Note: HTML is not translated!

Rating: Bad           Good

Enter the code in the box below:



Tags: CS520, CS 520
PURCHASE SAVE
2 Tutorials 10%
3 Tutorials 13%
4 Tutorials 16%
5 Tutorials 19%
6 Tutorials 22%
7 Tutorials 25%
8 Tutorials 28%
9 Tutorials 31%
10 Tutorials 34%
add url more

9MZQASHWN73B