CS20 B Java Data Structure Assignemt1 Spring 2009

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

CS20 B Java Data Structure – Assignment 1

Due Date (25 February 2009 by 6:30 PM on Zeus)


Design, code, and test the following software components. Write documentation to instruct user
as how to use them. You can write your design separately in a Microsoft word document. What
do I mean by design? Write clearly the thought process and steps that led to the classes that you
ended up coding.

Component 1:
Write a program to generate addition and multiplication tables for single digit numbers that
elementary school students are accustomed to seeing.

Algorithm:
Input: None
Output looks like below if you use JTable object:

You are also free to write above component as an applet.

Component 2:
Write a command line driven software component that determines all pairs of positive integers,
(a, b), such that a<b<1000 and (a2 + b2 + 1)/(ab) is an integer. [Hint: if x/y is an integer then x%y
will be zero].

You might also like