Presentation is loading. Please wait.

Presentation is loading. Please wait.

Which best describes the relationship between classes and objects?

Similar presentations


Presentation on theme: "Which best describes the relationship between classes and objects?"— Presentation transcript:

1 Which best describes the relationship between classes and objects?
Classes and objects are the same Objects are instances of classes Classes are instances of objects

2 Consider this code: What is GraphWin? A class An object A variable
w = GraphWin('Hi there', 100,200) What is GraphWin? A class An object A variable A parameter A call to a constructor

3 Consider this code: What is 100? An object A variable A parameter
w = GraphWin('Hi there',100,200) What is 100? An object A variable A parameter A call to a constructor

4 What is GraphWin('Hi there', 100,200) ? An object A variable
Consider this code: w = GraphWin('Hi there', 100,200) What is GraphWin('Hi there', 100,200) ? An object A variable A reference to an object A call to a constructor

5 Consider this code: What is w? An object A variable
w = GraphWin('Hi there', 100,200) What is w? An object A variable A name for an object A and B A and C B and C A, B, and C


Download ppt "Which best describes the relationship between classes and objects?"

Similar presentations


Ads by Google