DOC PREVIEW
Gordon CS 112 - INTRO TO PROGRAMMING

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS112 - INTRODUCTION TO PROGRAMMINGProgramming Project #2 - Due Monday, March 10, at the start of classPurpose: To give you experience with creating and using a classIntroductionIn Lab 6, you created a Clock class. This project involves using several instances of it in a program, together with making significant improvements to its appearance and functioning.What you will do for this project is to create a program that - as a bare minimum - displays several clocks that continually display the correct time in different time zones. Full credit will come from improving the appearance of the clocks and/or adding the ability to display the time in digital form as well as analog form.Your program will consist of two classes: a main class (Project2) and a Clock class. The latter will be based on the class you created in Lab 6, but with various improvements, as discussed below. Because your main class will be derived from objectdraw.WindowController, which is, in turn a subclass of java.Applet, supplying a suitable .html file and a downloadable copy of the obejctdraw library will make it viewable on other computers. After the projects are completed, your program will be posted on the department’s web server so that fellow students, parents, friends, etc. can see what you’ve created as well. You may also enjoy looking at versions of a similar project created by students in previous years, linked off the course home page -though you should bear in mind that the project requirements in previous years were significantly different.EvaluationYour grade on this project will be based on two criteria:1. Correct, operation and neat, aesthetically pleasing appearance. (maximum 50-80 points, depending on options chosen)2. Good methodology, including use of comments, appropriate variables and symbolic constants,, meaningful names, and good use of white space to aid readability (indentation and blank lines). (maximum 20 points)There will not be a project quiz.A blank project cover sheet is attached and should be stapled to the front of your project.RequirementsMinimal Requirements - maximum of 50 points for correct operation and aesthetic appearanceFulfill the following requirements:• Your program must display a minimum of four different clocks - though it can display more if you wish. One of these must be significantly bigger than the others. (E.g. perhaps twice as big, though aesthetics may dictate using a somewhat smaller or larger size).1• Each clock should display the current time in a different time zone, and should be labeled in some fashion with the name of its time zone. You will probably want the larger clock to display the local time zone (Eastern), though you could use it to display some other zone if you prefer (e.g. the zone of your home town.) All clocks must update themselves continually. The following shows what a minimally-satisfactory fulfillment of these requirements might look like. [ See discussion below under “Implementation Notes” for suggestions on how to do this. ] 2Ways of Earning Additional Points toward Full CreditEach of the following is worth a maximum of additional points as specified. Credit will be based on the aesthetics and correct operation of the finished product. It is more beneficial to do what you do well than to do lots of things sloppily. Full credit for each item will require doing it very well, with partial credit awarded for a reasonable effort. • Add “hash-marks” around the face of the clock (Use some of the “border” area.) (up to 5 points)• Add numbers around the face of the clock (Use some of the “border” area.) (up to 5 points)• Improve the appearance of the clock hands. (up to 5 or 10 points, depending on method chosen)• Display the time in digital form as well as analog form. This can be combined with the time zone label if you wish. (The code to update the digital time must be included in the class's updateTime() method, rather than being a separate method.) (up to 5 points)• Other creative possibilities of your own devising (up to 5 points)The following shows what possible approaches to fulfilling the first four of these might look like - but please don't view them as something to be slavishly imitated. No examples are provided for “other creative possibilities”, but you may get ideas by looking at projects from previous years. (up to 5 points) (up to 10 points)3Some things to note in the above• “Hash-marks” are shown at all twelve hour positions, with shorter intermediate marks for the minute/second positions between. This is required for full credit, with lesser credit possible for less than this. [ The hash marks at the hour positions in the example are short lines, and the intermediate marks are dots (small filled circles, but you can use lines of differing lengths or colors or dots of different sizes or colors for both if you prefer - just so it is possible to visually distinguish the two kinds of mark. ] Of course, there must not be an intermediate mark at the twelve hour positions. It is not required that the size of these scale with the clock diameter - they can be a constant size regardless of diameter. [ See discussion below under “Implementation Notes” for suggestions on sizes. ] • All twelve hours positions are numbered, and the position of the numbers relative to the clock face is uniform. This is required for full credit, with lesser credit possible for fewer marks and/or for spacing that is not as uniform. [ See discussion below under “Implementation Notes” for suggestions on how to do this. ] Once again, it is not required that the size of the numbers or spacing between the numbers and the clock face scale with the clock diameter. • Two approaches are shown for improving the appearance of the hands. The first approach just adds dots at the ends of the hands; the second draws the hands as filled arcs. The second is much harder to do, but is worth 10 points, wherease the first approach is worth 5. [ See discussion below under “Implementation Notes” for suggestions on how to do the filled arcs. ] • The digital time is centered beneath the clock face, and times are formatted correctly - e.g. 1:03:04 would be displayed as 1:03:04 not 1:3:4 or 01:03:04. Of course, a number less than 1 or greater than 12 will never appear as an hour! [ See discussion below under “Implementation Notes” for suggestions on how to center


View Full Document

Gordon CS 112 - INTRO TO PROGRAMMING

Download INTRO TO PROGRAMMING
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view INTRO TO PROGRAMMING and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view INTRO TO PROGRAMMING 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?