{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Overloads - UAH CPE 212 Fundamentals of Software...

This preview shows pages 1–7. Sign up to view the full content.

UAH CPE 212 Fundamentals of Software Engineering Agenda Class 5 Classes and Operator Overloads More on Classes Operator Overloading Key Concepts

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
UAH CPE 212 Last Time Concept of a class Common attributes Basic class definitions and utilization Declaring data members and data functions Member selector operator
UAH CPE 212 Classes Again Topics Default Arguments Default Constructor (another way) Parameters Formal Placeholder Actual By Value and By Reference Const again Return values

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
UAH CPE 212 Pass-by-value CALLING BLOCK FUNCTION CALLED sends a copy of the contents of the actual parameter SO, the actual parameter cannot be changed by the function. C++ Plus Data Structures Slide by Sylvia Sorkin, Community College of Baltimore County - Essex Campus
UAH CPE 212 Pass-by-reference sends the location (memory address) of the actual parameter can change value of actual parameter CALLING BLOCK FUNCTION CALLED C++ Plus Data Structures Slide by Sylvia Sorkin, Community College of Baltimore County - Essex Campus

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
UAH CPE 212 Point Class Declaration // FILE: point.h // CLASS PROVIDED: Point (an ADT for a point on a two-dimensional plane) // // CONSTRUCTOR for the Point class: // Point(double initial_x = 0, double initial_y = 0) // Postcondition: The Point has been set to (initial_x, initial_y). // // MODIFICATION MEMBER FUNCTIONS for the Point class: // void shift(double x_amount, double y_amount) // Postcondition: The Point has been moved by x_amount along the x axis // and by y_amount along the y axis. // // void rotate90( ) // Postcondition: The Point has been rotated clockwise 90 degrees around // the origin.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}