All of the work in this project is my/our own!   I/We have not left copies of my code in public folders on university computers. I/We have not given any of this project to others. I will not give any portion of this project to others taking this class. I realize that the penalty for turning in work that is not my own can range from an "F" in the class to dismissal from Trinity University.  

                                                      Print Name   __________________________      Time Required = ______.____ Hrs.

                                                      Signature    __________________________   (pledged)

Team Mate:

                                                      Print Name   __________________________      Time Required = ______.____ Hrs.

                                                      Signature    __________________________   (pledged)


IntArray 1 Lab
Individual/Team (1-2 Persons)   Assignment
30 Points

1] Copy your Stack class to a file called IntArray1.java

2] Replace every occurrence of top with actNo.

3] We are going to create our own Integer Array class. You may not use any of the built in Java Array or Vector processing tools for this lab.

4] Your private data is to be

	private int [] info;
	private int actNo;
	private boolean sorted;
	private int max;
5] Write the constructor 
IntArray1(int maxElements)
which
6] Write functions
void Display ();
void Display(String message)
which

       Message
       |----------------------------------------------------|
    3 |                                                1232 |
       |----------------------------------------------------|
    2 |                                                 331 |
       |----------------------------------------------------|
    1 |                                                5555 |
       |----------------------------------------------------|
       actNo = 3                  max = 5               sorted = false

Write function
void QuickAndDirtyDisplay (message);
which

       Message
       actNo = 22                  max = 500               sorted = false

      12       233         1        13       28       1111       122          2       211         21
     332       213       221      4223        8          1        22        333       111        221
     111        18

6] Write function   // use the one from your stack program - modify slightly
void Resize (int changeAmount);
which
7] Write function
void FillRandom (int noToFill, int low, int high);
which
8] Write function
void FillFromFile (String FileName);
which
9] Write function
int SequentialHigh ();
which
10] Write function
int SequentialLow ();
which
11] Write function
double Mean ();
which
12] Write function
int Sum ();
which
13] Write function
int TestIntArray1 ();
which
public static void TestIntArray1() 
{
    System.out.println("======================    Test Default Constructor ===========================");
   
    IntArray1 nos1 = new IntArray1();
    nos1.Display("Contents of nos1");

   System.out.println("======================    Test Normal Constructor ============================");
   IntArray1 nos2 = new IntArray1(4);
   nos2.Display("Contents of nos2");

   IntArray1 nos3 = new IntArray1(-4);
   nos3.Display("Contents of nos3");

   System.out.println("======================    Test Sum ===========================================");
   
   nos1.info[1] = 5;
   nos1.info[2] = 15;
   nos1.info[3] = 10;
   nos1.actNo = 3;
   nos1.Display("Contents of nos1 = 5 15 10 ");
   System.out.println("Sum = " + nos1.Sum());
	
   // You Do

}
 

14] Document each and every module for javadocs


15] Those Labs labeled "Individual Assignment" are to be done separately by each individual. Using a pen,   each individual is to print   his/her name at the top of this document in the space provided and sign it.   Those Labs labeled "Team Assignment" may be done as a team or individually. Using a pen,   each individual on the team is to print print his/her name at the top of this document in the space provided and sign it. Submit only one copy of team assignments!

   What To Turn In


Staple one copy per team of the following in this order

A] Copy of this assignment sheet. Using an ink pen, print your name and sign this lab at the top.

B] A copy of IntArray1.java

C] A copy of the output from your program

D] Make a copy of your workspace. Call the copy IntArray1

E] Place a copy of your workspace in folder IntArray1 on my drive /users/thicks/1321-HW/username