Homework Assignments for CS 125

Below are you Java programming assignments. When you are done with an assignment, you will send me your program by e-mail; here are instructions for exactly how you should turn in your assignments.. We will go over the details of this in class.

Assignment 8.
Write a program that creates an integer array of size 10 and then fills the array with randomly chosen integers between 1 and 10 in such a way that no two integers in the array are the same (so the array will end up containing a random permutation of the integers 1 through 10). Your program should print out the array so that you can check that it is correct. (Hint: You can use a for-loop inside a while-loop inside another for-loop. The outer for-loop steps through the array; the while-loop generates random numbers until one is found that is not already in the array; the inner for-loop checks if a number is already in the array.) This is due Friday, May 5.

Assignment 7.
First, do Programming Exercise P6.10 on page 265 of the textbook (your random centers should be within the 300 by 300 pixel applet window, your random radiuses should be less than 50). Then modify your program slightly in the following way: When computing a random radius, after you have computed a random number between 0 and 1, raise that number to the negative 1/2 power and then use that result as the radius. This change will have a dramatic affect on the appearance of the output of your program. Write your program so that it is easy to switch from one appearance to the other. (To really see the difference in appearance, run your program each way with n anywhere between 500 and 1000.) At the beginning of your program, write a comment that qualitatively describes how the output changes from the first to the second version of the program. This is due Wednesday, April 26.

Assignment 6.
Do Programming Exercise P4.11, page 180 of the Java textbook. This assignment is due Friday, April 14; please follow these instructions for turning in your assignment.

Assignment 5.
Do Programming Exercise P2.7, page 96 of the Java textbook. This assignment is due Wednesday, April 5; please follow these instructions for turning in your assignment.

These are your Maple homework assignment worksheets. You can configure your browser so that when you click on one of these links it will ask you where you would like to save the Maple worksheet and then the browser will download and save the worksheet for you. Then you can open the worksheet using Maple.

However, if after you click on one of these links you get a page full of nonsense, then return to this page and "right click" (i.e., use the right mouse button) on the link that you want. Both Netscape and Internet Explorer will pop up a "context menu." With Netscape you should click on the "Save Link As ..." menu item; with Internet Explorer you should click on the "Save Target As ..." menu item. Then the browser will ask you where you would like to save the worksheet.

Review Problems for Exam 1.
Here is a list of 17 review problems for the first exam. I have also prepared a list of Maple commands and terminology that you should be familiar with for the exam. The list is available both in an HTML format and as a Maple worksheet.

Assignment 4.
Download this Maple V Release 5 worksheet, and save it on your computer. Open the worksheet using Maple VR5 (or with Maple V Release 4), then follow the instructions in the worksheet. This is due Friday, March 10.

Assignment 3.
Download this Maple V Release 5 worksheet, and save it on your computer. Open the worksheet using Maple VR5 (or with Maple V Release 4), then follow the instructions in the worksheet. This is due Monday, February 28.

Assignment 2.
Download this Maple V Release 5 worksheet, and save it on your computer. Open the worksheet using Maple VR5 (or with Maple V Release 4), then follow the instructions in the worksheet. This is due Monday, February 14.

Assignment 1.
Download this Maple V Release 5 worksheet, and save it on your computer. Open the worksheet using Maple VR5 (or with Maple V Release 4), then follow the instructions in the worksheet. This is due February 2.

Return to the main Maple page.
Return to the CS 125 home page.


compliments and criticisms