Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Classes and Objects Shirley Moore CS 1401 Spring 2013 cs1401spring2013.pbworks.com April 23, 2013.

Similar presentations


Presentation on theme: "Introduction to Classes and Objects Shirley Moore CS 1401 Spring 2013 cs1401spring2013.pbworks.com April 23, 2013."— Presentation transcript:

1 Introduction to Classes and Objects Shirley Moore CS 1401 Spring 2013 cs1401spring2013.pbworks.com April 23, 2013

2 Agenda Announcements Finish More Array Fun exercise Introduction to Objects and Classes

3 Announcements UTEP STEM Career Day today – http://stem- day.utep.edu/http://stem- day.utep.edu/ Women in Engineering (WIN) networking meeting, Thursday, April 25, 4-6pm, Eng E226 Exam 3 on Thursday, April 25 – Practice problems on course website under Lectures Extra Exam 3 Review with Peer Leaders – CCSB 1.0704 Tue 4/23 and Wed 4/24, 3-4pm Lab 8 (Algorithm Analysis) due today Unit 4 Plan posted on course website

4 Classes and Objects A class defines the properties (data fields) and behaviors (methods) for objects. Unified Modeling Languages (UML) – Standardizes class and object diagrams An object is an instantiation of a class.

5 Example: Circle Class and Objects Circle radius: double Circle() Circle(newRadius: double) getArea(): double getCircumference(): double getRadius(): double setRadius(newRadius: double): void Class name  Data fields  Constructors and methods  circle1: Circle radius = 1.0 circle3: Circle radius = 12.8 circle2: Circle radius = 7.5


Download ppt "Introduction to Classes and Objects Shirley Moore CS 1401 Spring 2013 cs1401spring2013.pbworks.com April 23, 2013."

Similar presentations


Ads by Google