CS 106B Lecture Notes - Lecture 14: Digital Library, No Code, Semicolon

35 views2 pages

Document Summary

Announcements: chris piech office hours moved to tomorrow, midterm materials online this afternoon. Another midterm on friday, solution available monday. The need for new variable types: you might be writing a music synthesizer app, but there is no. Instrument type in c+: many other variable types do not exist in c+, writing a class defines a new data type. What are the flaws to structures: functions on structures that we can call i other functions, we want to use encapsulation. Setting up a wall of abstraction between the bank account data and the user: we can control the way the user interacts with the data. Classes: class: a template (blueprint) for a new type of variable, elements of a class. Member functions: behavior that executes inside each object. Constructor: initializes new objects as they are created: class declaration. Remember to put semicolon at the end of class after a bracket.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers