









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Wade George Wendle Lee
George : Student · (^) Name=“George” · (^) Attendence=100% · (^) Current Grade=A
Lee : Student · (^) Name=“Lee” · (^) Attendence=85% · (^) Current Grade=B
Notice that the data members are replicated in each object. Each object is an instance of Student. It does not make sense to replicate member functions.
Functionally-Oriented Instructor Take Attendence() { Look at back of each student’s hand!!! }
Object-Oriented Instructor Take Attendence() { Ask each student for their name. }
You're just data to me. Hand it over so I can do my job.
You're an object. You implement something I need. I'll ask you for it.
Messages are passed and handled, rather than invoked like functions. Docsity.com
Person · (^) Name
Student · (^) Name · (^) Attendence · (^) Current Grade
Comparison of
Functional vs. OO Views
Print Transcript
Submit Grade
Students
Students Grades
Student/Grades
Student
Register( ) Submit Score( ) Print Transcript( )
0..*
Score Name 0..* Value
Print Transcript
Submit Grade
Students
Students/ Pass Fail Students Grades/PF
Student/Grades/PF
Student
Register( ) Submit Score( ) Print Transcript( )
0..*
Score Name 0..* Value
PassFail Student
Print Transcript( ) function override
0..*
Score Name Value
Student Register( ) Submit Score( )
0..*
0..
Transcript Print( )
0..
PassFail Student Determine Grade( )
0..*
Score Name Value
0..
Transcript Print( ) Student Register( ) Submit Score( ) Determine Grade( )
0..*
0..
PassFail Student Determine Grade( )
0..*
Score Name Value
0..
Transcript Print( )
0..
Report Card Print( )
Student Register( ) Submit Score( ) Determine Grade( )
0..*
0..
0..
Library Package
Media Borrowers Fines