Oriented Programming Introduction
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
AP/ITEC 2610-M&N: Object-Oriented Programming
Introduction
In this assignment you will create a simple program to display a drawing of your choice, subject to the conditions below. You cannot use any of the examples in Chapter 3 or elsewhere in the textbook. Doing so will result in a grade of 0.
Your Task
Create 3 classes following the model shown in Lesson 2 (Chapter 3). Assuming your drawing is called X (though I expect better names), you need to provide the following classes:
-
X, responsible for drawing your chosen graphic
-
XComponent, responsible for displaying your drawing
-
XViewer, your main program responsible for creating the frame for your drawing
Your drawing must meet the following content requirements:
-
It must contain lines, rectangles and ellipses
-
It must contain at least 10 components of the three kinds above
-
It must use at least three colors
-
It must include a descriptive text, also displayed as a graphic
In addition, your programs must meet the following style requirements:
-
Use standard Javadoc documentation
-
Include other comments as needed
-
Use standard and significant naming conventions
-
Declare variables one to a line, at the beginning of relevant blocks (except loop variables)
-
-
Initialize all variables
-
Indent correctly using 4 space indentation
-
Align closing braces to opening braces (if you place opening braces on a separate line) or to the beginning of the statement starting the block
-
Use constants where appropriate
-
One statement per line
Marking scheme:
-
4 marks for the content of the drawing; 0.5 marks will be subtracted for every requirement that was not met; E.g.;
-
A drawing with only 8 components will lose 1 mark
-
A drawing without ellipses (or circles) will lose 0.5 marks
-
A drawing without a text will lose 0.5 marks
-
A drawing with a single color will lose 1 mark
-
2 marks for correct compilation of the program
-
1 mark for correct running of the program
-
There are no marks for style components in this assignment, but you are strongly encouraged to follow them. Comments as to poor styling will be provided. Assignment #2 will include marks for coding style, so this will be a preparation effort for the next assignment.
In other words:
-
A program that does not compile can score a maximum of 4 marks
-
A program that does not run can score a maximum of 6 marks (partial marks can be obtained for a program that runs incorrectly)