1.2.14 Divides.java, a program that takes two positive integers as command-line arguments and prints true if either evenly divides the other.
1.2.28 InOrder.java, a program that takes three double values x, y, and z as command-line parameters and prints true if the values are strictly ascending or descending (x < y < z or x > y > z), and false otherwise.
1.2.34 ThreeSort.java, a program that takes three int values from the command line and prints them in ascending order, using Math.min( ) and Math.max( ).
Ground rule: No IF statements! You may use only as much Java as you see in sections 1.1 and 1.2 of the book.
E-mail subject line: 201 homework 1.2
This assignment is due by 4:30 p.m. on Tuesday, September 9. Submit three source-code attachments, named as above, to one e-mail to the instructor, and bring a hard copy of each to the CSC 100 meeting at 4:30. If you are unable to attend class, fax your work to 703-845-6006 before 4:30.
Here is a wee sample program indicating the kinds of comments, spacing, mnemonic names, and overall clarity expected in your work.
See also SkeletonTwo.java (above) for a sample of what should be commented and how.
I will post standards for your programs by the close of business on Friday. Meanwhile, you can get an idea of what the standards will be from these old standards: click for grade sheet, click for standards. Click also for overall policies.
Thursday, September 4, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment