美澳CS留学王牌高校汇总 | 来看看CS留学该选择哪些学校专业吧
AP/ITEC 2610-A: Object-Oriented Programmin
Due Date: by 11:55 PM on the date stated on the Moodle course page
This Assignment is worth seven marks (7%) of the total final grade.
Submit all (3) source files (.java, not .class) using Moodle. Do NOT use zip utilities or packages, because improper use of these tools can cause failure to access the source, resulting in significant loss of marks. There is no recourse against these types of errors!
Create your code from scratch, using a basic editor such as Notepad or Notepad++. Any evidence of using code generators or IDEs will result in significant loss of marks. If you use classes and coding approaches not taught in class you will be asked to explain your code and reasoning. Failure to do so adequately will result in significant loss of marks.
Make sure your code compiles and runs under the JDK available in the ITEC labs. Code that does not compile will receive a maximum of 4 marks. Claims like “although it does not compile with JDK, it works under my favorite IDE” will not be considered. It is highly recommended to try and compile your program on one of the computers in the DB labs.
See FAQ file on www.pateanu.ca/yorku/FAQ.htm for late assignment rules.
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.
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
- Follow coding standards as described in http://www.oracle.com/technetwork/java/codeconventions-150003.pdf but as a minimum:
- 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
- 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)
If 2 or more programs are evidently copied from each other, ALL assignments involved will get 0 marks.
Remember: When in doubt, ASK!!