Lab4 - Thomas Nanke CIS 200-001 CIS 200L-001 Lab#4 Struct...

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 #4 Struct and Class Employee 2/11/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 standard modern PC in the Science Building Computing Wing with Microsoft XP Professional as the operating system. The compiler type is whatever compiler these computers here on campus use, which I believe is the Visual 6.0 Compiler. The goal of this lab was to basically achieve the same result by using two different methods; implementing use of a struct and use of a class. I found the struct way easier, but then again, I might not have done the class part as efficiently as possible. In both parts, I had the user input the different data values, passed those elements of the array to the PrintEmployee function, and had correct output results on the screen. In using the class, three additional member functions had to be used. Now here is a copy of my source code, followed by a test case design and screenshots at the bottom. #include<iostream> using namespace std; struct Employee { int age; int id; float salary; int getAge() {return age;}; int getId() {return id;}; float getSalary() {return salary;}; }; void PrintEmployee(Employee[],int); void main() { Employee employee[2];
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

Lab4 - Thomas Nanke CIS 200-001 CIS 200L-001 Lab#4 Struct...

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