Final Info
Overview and Process
For Spring 2024, we will be moving the final exam for CS 103 to an ONLINE, remote exam. However, it is NOT optional, but must be taken at the scheduled time.
Exact details are still being worked out, but here are the details and policies you need to follow.
- The exam will be administered on Gradescope starting at 4:30 p.m Pacific. on Tuesday, May 7th, and will still be multiple choice. Login to Gradescope (using the links on our Blackboard section) a few minutes beforehand and at 4:30 p.m. you can refresh and the exam should be available.
- It will be shorter (likely under 45 min to complete). I’ll announce the exact time soon.
- Everyone must login via this Zoom link with your camera on during the entire exam and your face must be visible as you take the exam as we will track attendance.
- You can take the exam from anywhere: dorm, library, home, etc.
- Students with appointments at OSAS can honor those and take it at the testing center at the start time you scheduled (but bring your laptop) ..OR.. you may take it at an alternate location. Again, if you take it at OSAS, please bring your laptop.
- You may reference our CS 103 course slides and notes you may have taken or prepared ahead of time. But that is all.
- You may NOT use:
- Input or guidance from any other humans or AI-bots
- Outside editors (VSCode, CLion, etc),
- Generative AI (like chatGPT), etc.
- websites (Stackoverflow, cplusplus.com, etc.),
- Codio
- Date/Time: Tues, May 7th at 4:30 PM Pacific Pacific
- Questions: Any questions about the content of the exam (clarification, etc.) should be asked on EdStem (and not by raising your hand) to avoid disrupting your neighbors.
Topics
The following is the list of topics that you should be familiar with. Use it as a guide to help your studying.
Unit 3a
- Basic objects (structs)
- Assignment of objects
.
and->
operators- Use of
getline()
- Checking an input stream for failure
- Using C++
string
class
Unit 3b
- Defining your own classes
- public vs. private
- Constructors and Destructors and when they execute
- Defining member functions
- Splitting your class into files
Unit 4a
- Linked Lists
- Implementing basic operations (push, pop to front, middle, or back)
- Efficiency of various operations given variations of their implementation (with or without tail pointer, etc)
- Pros and cons compared to arrays
Unit 4b
vector<T>
anddeque<T>
basic operation- Efficiency of their operations
Unit 4c
- Doubly linked lists
deque<T>
class- Implementing basic operations
- Efficiency of various operations given variations of their implementation (with or without tail pointer, etc)
Unit 4d
- Multidimensional arrays
- Memory layout of a multidimensional arrays
- Passing multidimensional arrays to functions
Unit 4e
- syntax and use
- advantages of passing by reference
const
references
Unit 4f
- Checking for failure when opening a file
- Using C++
ifstream
andofstream
classes for File I/O - Checking for failure when attempting to receive input (extract a value from the stream)
Unit 5a - Operator Overloading
- Understanding the two approaches (Global vs. Member functions) and when to use each
- The signature of various operator overloads (arithmetic, comparison, etc.)
friend
functionsoperator<<
function signature and implementation
Unit 5b - Copy Semantics
- Copy constructors
- Assignment operators
- When each is called
- “Gotchas” that the assignment operator should handle
- Rule of 3
Unit 5c - Class Details
- Default vs. Initializing constructors
- Constructor Initialization Lists
const
keyword
Unit 5d - Inheritance
- Base class constructor and destructor calls
protected
keywordpublic
vs.private
inheritance- Composition vs. Inheritance
- Calling base class overloaded functions
Unit 5e - Polymorphism
- Static vs. Dynamic binding (
virtual
vs. non-virtual
) - pure virtual functions and abstract classes
- need for
virtual
destructors
Unit 5f - Parsing and Streams
operator>>
andgetline()
- When do input streams fail (
fail()
) - Correct approaches for how and when to check for failure
stringstream
s
Unit 5g - Exceptions
throw
keywordtry/catch
block- ordering of
catch
blocks - stack unwinding (exceptions propagating to calling functions)
- exceptions and inheritance
Unit 5h - File I/O Part 2 - Not covered in Spring 23
get()
andpeek()
seekg()
andtellg()
Unit 6a - Recursion
- Tracing of recursive functions
Topics from MT1 and MT2 are potential supporting material (you need to still understand pointers, linked lists, etc.)
Be sure you are very comfortable with:
- Pointers
- C-strings and pointers to C-strings. Arrays of char*’s (like argv[])
- Linked lists (single- and doubly-linked)
vector<>
anddeque<>
- Operator overloading (when to use global vs. class member functions, use of
friend
, etc.) - Deep copy semantics (copy constructor / assignment operator)
- Inheritance and Polymorphism
- Streams and parsing with
>>
andgetline()
, usingstringstream
s, and knowing when a stream will fail.
Practice Final on Gradescope
- Will be done in our last lab meeting.
- Gradescope Solutions
- Coding problems are on Codoi and solutions are in that assignment.
Other Selected Practice Problems
Older Practice Problems
- Fall 2017 Final Exam
- No solutions / crowdsource your answer or come to office hours.
- Fall 2016 Final Exam
- No solutions / crowdsource your answer or come to office hours.
- Spring 2015 Final Exam
- Fall 2014 Final Exam
- Older Fall 2014 Practice Problems