CSC400 Final Exam Answer sheet
Name:_Emily Guinto_
Depaul id# _1485030_
Answer ALL the questions.
Show all your works for Part III in order to receive full credit !
Write your answers to Part I & Part
/Jonathan Younan
/CSC 383401
/[email protected]
/SingleQueue.java
/101112
/This program is simulating a different queue for each of the 5 servers
import java.util.*;
public class IndividualQueu
CSC400 Hw6
1. order the following functions by asymptotic growth rate:
210
4n
n3
4nlogn + 2n
3n + 100 log n
n2 + 10 n
2 logn
2n
n log n
2. Give a bigOh characterization, in terms of n, of the running
The class Bag
For the class Bag<T> (with extendible array, defined
in "Bag.java" written in the 10/12 class), add the following
method:
public T remove(T elt)  This method searches
through the 'data
The class LinkedList class (add selected methods from
Textbook Exercises on p. 164165)
Using the class LinkedList (singlylinked) shown in the class
lecture note on Lists, add the following methods.
1.
Think Java, Chapter 7 (Iteration), Exercise 1.
o Create a new program, named LoopApp (thus
the class name is LoopApp and the filename has
to be "LoopApp.java"). Then copy the two
methods shown on t
1. Write a program which computes the expected cost of
an item in a specified number of years. The program
asks for the cost of the item, the number of years from
now that the item will be purchased,
Class MyLoan and an application
Name the class "MyLoan".
Write the class, and an application program in main(),
in the same file.
The class MyLoan should have the following members:
Private instance
Tiny Scrabble Game
This problem to implement a small application which
simulates the game of Scrabble. Your specific task is to
write two classes from scratch (LTile and RandomBag) and
complete an app
A A . A
if A A =

1
2
i

n
=
A + A
1
2
 +.+ 
A
n

j
AA
1
2
=
A + A
1
2

AA
1
2

A A A = A  +  A  +  A 
 A A  A A  A A + A A A 

1
2
1
n
 i =1Ai  =
3
2
1
1
n
 Ai 
i
Examples from the chapter 9 of the text
9.5.10 How many different ways to arrange the letters in the word MISSISSIPPI ?
Answer :
Answer =
1 M 4 Is 4 Ss 2 Ps
11!
4!4!2!
Balls in the boxes
9.6.2 How man
Combinatorics
The study of the number of ways to put
things together into various combinations.
E.g. In a contest entered by 100 people,
How many different top10 outcomes could
occur?
E.g. If a p
import java.util.*;
public class MathamaticalFormulas cfw_
/ Mathamatical constants
final static double PI = 3.14;
final static double E = 2.71;
final static int BITS_PER_BYTE = 8;
final static i
/DescriptiveStats.java
/Jonathan Younan
/[email protected]
/CSC 383401
/*This program will find the average value, mininum value, maximum value,
standard deviation, and median of a sequence of e
/ParseXML.java
/Jonathan Younan
/[email protected]
/CSC 383401
/This program will parse through an XML file
import java.util.*;
public class ParseXML
cfw_
/This method will parse through a XML
/Jonathan Younan
/MaxPQArrayList.java
/[email protected]
/CSC 383401
/This program is about priority queues
/10252012
import java.util.*;
public class MaxPQArrayList<Key extends Comparable<Key>
Hw3
1. 1. Solve the following recurrence relation :
ak 7ak 1 10ak 2 k 2 with a0 a1 2
2. Solve the following recurrence relation :
ak 4ak 1 4ak 2 with a0 0 a1 1
3. a) Define F : Z Z by the rule F(n) =
Hw4
1. Determine whether the relation R on the set of all people is reflexive, symmetric, antisymmetric, and/or transitive, where (a,b) R if and only if
(a) a is taller than b.
(b) a and b are born on
/ filename: autoboxing.java
/
/ This program demonstrates the 'autoboxing' in Java  a primitive
/ data types (int, double, char etc.) and their respective reference
/ types (Integer, Double, Characte