Lab6 - Thomas Nanke CIS 200-001 CIS 200L-001 Lab#6 Sorted...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Thomas Nanke CIS 200-001 CIS 200L-001 Lab #6 Sorted and Unsorted List Operations 3/7/08
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The Machine type that I used is the PC with Microsoft XP Professional as the operating system. The compiler type is the Microsoft Visual 6.0 Compiler. The goal of this lab was to write definitions for an UnsortedList class and also for a SortedList class. We were given the member functions, their return types, and their parameters. We had do define and implement them. We were supposed to open a file called int.dat but in using int.dat in my code, my program executable wasn’t doing what it was supposed to, so I just created a text file int.txt and used that in my code instead. int.txt is exactly the same as int.dat so I didn’t see a problem in doing this because the programs do exactly the same thing, just using a different file. The function definitions for the unsorted and sorted lists were nearly exactly the same. The only function that I changed was the Store/Insert function. Insert was a little bit more complex because it was used in the SortedList. Now here is a copy of my source code for Question 1: #include<iostream> #include<fstream> using namespace std; const int MAX_ITEMS = 20; typedef int ItemType; class List { public: void Store(ItemType item); //Pre:The list is not full. //Post:Item is in the list.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/25/2010 for the course CECS CIS 200 taught by Professor Jieshen during the Winter '08 term at University of Michigan-Dearborn.

Page1 / 7

Lab6 - Thomas Nanke CIS 200-001 CIS 200L-001 Lab#6 Sorted...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online