From charlesreid1

No edit summary
Line 1: Line 1:
=Chapter 8 Review=
=Chapter 8: Object Oriented Programming (Review)=


Chapter 8 sections:
==Chapter 8 Summary===
 
Chapter 8 concepts:
* Object oriented programming (classes and objects)
* Object oriented programming (classes and objects)
* Object state (fields) and behavior (methods); accessors
* Object state (fields) and behavior (methods); accessors
Line 8: Line 10:
* Case study: Stock class
* Case study: Stock class


==Lecture Code==
==Chapter 8 Code==
 
===Lecture Code===


Contained in 00_HelloWorld directory in CSC-143 Github repository.
We have a simple object-oriented hello world program implemented in the 00_HelloWorld folder in the Github repository.


==Worksheet Code==
===Worksheet Code===


Polynomial - implement a polynomial object, add another polynomial, evaluate at value of x, find roots if deg < 3
Polynomials:
* In this assignment, you'll implement a Polynomial object
* Design the data structure for the polynomial object
* Implement 3 methods:
** Add to another polynomial object
** Evaluate the polynomial at x
** Find roots if degree < 3

Revision as of 19:26, 14 September 2016

Chapter 8: Object Oriented Programming (Review)

Chapter 8 Summary=

Chapter 8 concepts:

  • Object oriented programming (classes and objects)
  • Object state (fields) and behavior (methods); accessors
  • Object initialization (constructors)
  • Encapsulation (private fields)
  • Case study: Stock class

Chapter 8 Code

Lecture Code

We have a simple object-oriented hello world program implemented in the 00_HelloWorld folder in the Github repository.

Worksheet Code

Polynomials:

  • In this assignment, you'll implement a Polynomial object
  • Design the data structure for the polynomial object
  • Implement 3 methods:
    • Add to another polynomial object
    • Evaluate the polynomial at x
    • Find roots if degree < 3