CSCI 159 Bonus lab exercises
The bonus lab is an independent exercise (we won't be specifically covering
it in the labs), and is due by 8pm Friday Dec. 6th
There are as usual two halves: a warm-up exercise working with pointers, pointers to structs,
and dynamic memory allocation/deallocation
(warm-up exercise done in basic.cpp), then a design/implementation exercise (done in bonus.cpp):
- the basic/warmup exercise (basic.cpp), worth 6 marks
- the main design/implementation exercise (bonus.cpp), worth 12 marks
- both parts are due by 8pm on Friday Dec. 6th
Here is the collection of new C++ syntax elements we'll be using
for the bonus lab.
Follow our usual setup process
- Log in, open a browser, go to the bonus lab page, open a terminal window:
(see lab 2 if you need a refresher on any of the steps)
- get the bonus lab:
make -f make159 csci159/bonus
- Go into your bonus directory and begin the edit/compile/test/submit routine:
for the first half of today's lab:
- to edit basic.cpp: pluma basic.cpp &
- to compile basic.cpp: make basicx
- to test basicx: ./basicx
- to submit: make submit
once we get to the second half of today's lab:
- to edit bonus.cpp: pluma bonus.cpp &
- to compile bonus.cpp to create bonusx: make bonusx
- to test bonusx: ./bonusx
- to submit: make submit
As with previous labs, you'll see that the two .cpp files are nearly empty to start with.
First half: pointers and pointers to structs (to be done in basic.cpp)
T.B.D.
Second half: design and implementation problem (to be done in bonus.cpp)
T.B.D.