CECS 282
LAB ASSIGNMENT 9
Assigned date: 11/30
Due date: 12/6
20 points
Objectives
- Become familiar with the three basic components of STL: containers, iterators, and algorithms
- Learn how iterators are used
- Learn how to use appropriate containers to manipulate data in a program
Prelab
- Attend lecture and lab meetings for discussion questions on the lab assignment
- Review lecture notes on STL library
Problem
Create class called person with the following property and methods:
- name
- salary
- void setPerson() //input name and salary
- string getName()
- float getSalary()
Ccreate a multiset to hold pointers to person objects. Define the multiset with the comparePersons function object, so it will be sorted automatically by names of person. Define a half-dozen persons, put them in the multiset, and display its contents. Several of the persons should have the same name, to verify that multiset stores multiple object with the same key.
GRADING
- Inside the program, put your name at the beginning of your program
//YOUR NAME
// CECS 282 LAB 9
- Return a hard copy of the lab assignment.
- Demonstrate the lab assignment in the lab.
- Submit the lab assignment to the BeachBoard.