Homework Assignments


Java Programming Assignments

All the tools needed for Java programming are available on the CSS machines on the first floor of the Seamans Center.


To compile Java source files use the command:  % javac filename.java
(*.java can be used to compile all Java files in the directory)

To run a Java program use the command:          % java filename [args]
(where filename is the file with the method public static void main(String args[]))



Academic Misconduct

Please refer to the grading policies page for academic misconduct guidelines.



Assignment 0

Create a class webpage to post assignment to that is similar to this one. The login/passord for the example site is swd/tester. The site should be created in your H:\public_html\swd directory. Your site should be password protected using a .htaccess file. The .htpasswd file can be generated here. Each protected directory needs to have an .htaccess file; however, they all can link to one .htpasswd file. Here are the example files used:

.htaccess (in H:\public_html\swd)
AuthType Basic
AuthName SWD
AuthUserFile /unixpathtofile/.htpasswd
<LIMIT GET POST>
require user swd
</LIMIT>



.htpasswd (in H:\)
swd:CkvNp4SuuhiT6



All applets and source code should be posted on pages linked to by your main page. For future reference the html to display an applet is:

<applet code="YourApplet.class" width="x" height="y"/>



Create as assignment page using Figure 2.4 (Welcome3.java) from the example Java files posted online. There should be a link from your main page to this page (you can call it Assignment 0). The final step of the assignment is to email the TA with the URL, login and password for your class webpage.


HINT: you will need to modify the permissions of the files you post. chmod is the linux command to modify permissions. Set files to 644 and directories to 755

Another hint: the path to your .htpasswd file needs to be a unix path. Example: /user/student/hawkid/.htpasswd



This assignment is due by 5:00 PM on Aug 31, 2007.

Here are scans of the problems from D&D. It is a large pdf so right click and save as.

Assignment 1-14

Concepts Chapters Easy Medium Hard Number Required
Basic Applications 2-3 2.28     1
    3.13      
    3.14      
 
Control Statements and Methods 4-6 4.30 4.37   2
    4.31 6.32    
    6.38      
 
Classes and Objects 7-8 7.17 7.30 7.26 2
    8.16 8.14 8.18  
 
Inheritance and Polymorphism 9-10 10.9 10.11 10.12 1
 
GUIs, Applets and Event Handling 11-12, 20-21 11.13 12.24 12.22 3
    12.17 12.20 21.21  
    20.6 20.12 21.33  
 
Algorithms and Data Structures 15-19 15.18 15.15 15.20 3
    16.6 16.7 17.15  
    17.25 18.8    
    19.16 19.19    
 
Files and Streams 14   14.11 14.10 1
 
Multithreading and Networking 23-24   24.23 24.22b 1
        23.9  
 
Extra Credit 21-29        
 
Number Required   3 4 7 Total of 14
Weight by Difficulty   1 2 3  
Weighted Total   3 8 21 Total of 32

How it works:

One weighted point in the total is equal to one 'easy' assignment. Medium problems count double. Hard problems count triple. At the instructors discretion problems may be added to the available problems to choose from or may have their difficulty increased to accurately reflect the problems difficulty. However, problems will never be removed or have their difficulty decreased. Assignments will be graded during the two practical exams. See the exams page for dates and the grading policy page for how they are graded.


Extra credit may be earned by doing additional problems from this list or another problem that is approved by the instructor. Extra credit cannot be earned for additional medium problems until the minumum number of hard problems have been completed. Likewise, extra credit for easy programs requires the minimum number hard and medium problems have been completed.