CS 250 Computer Programming and Problem Solving - FALL 1998
|
[ Home | Syllabus | Notes | Glossary | CS250 WEB Version Home Page ]
Study Guide for Second Test
NOTE: this will be
an open book, open note exam!!
you are expected to bring copies of the notes and the examples discussed in class.
Covers material since the first
test (see syllabus for details)
Chapters 5,6,7 and 11
Important Topics:
- Object Oriented Design (definitions, doctor scheduling example)
- What is a scenario? Give a scenario.
- Inheritance and derived types (differences from composition (has-a)
relationship)
- know difference between base and derived classes
- know the protection relationships between base/derived classes and the
public.
- know different types of inheritance
- Linked Lists
- Templates
- In modifying FString to FixedString, I overloaded the comparison operators.
so what does this have to do with templates?
- List Objects
Set Of Examples
- doctorScheduler
- Write a test driver to test the Appointment Class
- Write the implementation for IsTimeSlotFree/SetAppointment for
the DailySchedule class
- For the Doctor class, write addToSchedule, GetSchedule, GetName
- Write the specification for a timeslot class that could be used.
- Change the scheduler class so that the array of doctors is stored
in a statically allocated private array
- Who allocates the space for the doctor array?
- Change the specification of the scheduler class to use a List
object which uses templates from those given in class.
- Change ScheduleOneAppointment so that it uses a patient class
that you also define and give the header for.
- Why would you want to have a private member function?
- derived classes
- In student example, where would you add an attribute gender, year
entered university.
- write statements to ouput these new attributes in the three
different implementations
- If private inheritance between person and student - how would you
allow access to the age?
- Ask what variables can be seen where
- what is the advantage of private inheritance.
- From user/programmer's point of view - difference between has2
and isa?
- Write "<" operator for Student which uses the GPA to rank
students
- copy constructor
- what happens when you drop lines?? from the copy constructor
definition
- define shallow/deep copy
- demonstrate shallow/deep copy
- what's a heap?
- why need destructor
- why is a copy constructor used
- effect of using the automatic copy constructor in VString
- VString
- add a copy constructor
- write overload output << operator
- Is is necessary to overload the assignment operator? - what would
happen if you didn't
- Long Array
- add a member function which will multiply every element in the array by
some number
- concatenate two arrays together
- return the average of all elements in the array (as member, as regular
function)
- MinT
- what restrictions are placed on the "T" objects
- Would MinT work for students?
- SafeArray
- What restrictions are placed on T objects in using SafeArray
- Could we make growBy a private member function? How would it be called?
- Linked Lists
- questions about rearranging lies of code for insertion/deletion
- Various List Objects (Should be able to use and
extend them)
Sections in the Book which can be
Skipped
- 6.2
- 6.3
- 6.4
- 7.1
- 7.2
- 7.4
- 11.2-end of chapter
Copyright chris wild 1998.
For problems or questions regarding this website contact [Chris
Wild (e-mail:wild@cs.odu.edu].
Last updated: October 29, 1998.