Project 4, due July 17 (Wednesday)
- Now... modify your program to keep a SORTED list of employees, 10 employees long.
- You will accept input from a file consisting of four lines of input per employee
- a first name/last name
- an id number
- a salary
- a position
- there will also be a fifth line, which is whether to continue or not.
- yes or no, alone on a line.
Project 4 use (for now):
Adam Samson
7
22000
Programmer
yes
Jason Stover
8
24000
Administrative Assistant
yes
Tom Cadel
3
27000
Assistant Manager
yes
John Dowser
4
45000
Manager
yes
Alan Weaver
10
52000
Research Scientist
no
CS151 -- Administration
Project 5, due July 24 (Teusday).Don't sweat it, there will be lots of in class examples... Just pay attention.
- Make a deck of cards. It must be in a file called Deck.C and Deck.h
- Each Deck will read in a set of cards, from a file. The file will be the same type used in project 4 as input to the employees.
- The deck must read in the cards, with the first thirteen entries being the first suit, the second being the second suit and so on. The name of the employee read in should be the value returned as the card number, and the suit should be the title the employee carries. (Program Manager, Programmer, Project Leader, Executive).
- The deck must return a Top card, and mark that card as read, so that it is not selected again, until the deck is re-shuffled. The card returned should be a random card from the deck. This must be:
Card getTopCard();- You must also be able to get the last card drawn. This must be:
Card lastCardDrawn();- You should be able to output all cards not yet drawn as well:
void output();- More information will be given as time allows.
Abstraction:
FunctionsfillBathTub ( <container>, <fromLocation> )
Literally an algorithm that can be used for many things by changing what is passed into it.
Abstraction
Why use functions... why do any of the stuff that we are doing?
- redundant code
- conceptual
- as an aid for the HUMAN reader!
Abstraction
Classes
- conceptual
- redundant code
Computer Science
Computer (what we are doing science with)Science (yes there actually is a method to our madness)
- we are not just hackers..
Computer Science
Why computer science
- automate tasks which are normally difficult or tedious
- find ways to do things that humans cannot do, because of the amount of computation.
Computer Science
Why computer science
- Therefore, we are concerned with efficiency.
- If something is redundant, find some way to do it once,
- locate such that doing it more than once is not difficult.