CSE 1321 Final Study Guide (Classes and OOP) Test Questions & Revised Correct Answers
CSE 1321 Final Study Guide (Classes and OOP) Test Questions & Revised Correct Answers Classes - ANSWER : *Represent the concept of things in the real world (example: Dogs) Follow the template: - name - variables (aka attributes) - functions (aka methods, behaviors, method functions) Variables relation to objects - ANSWER : These are what the object IS made up of Functions relation to objects - ANSWER : These are what the object CAN DO What would the smallest class look like? - ANSWER : class ClassName{ } Notice that there is no MAIN here (professor said this may be on test). *A class is basically just you creating a data type and it doesn't need to run any code unless you tell it to. *The class file gets created, and you create a separate driver program that includes MAIN and create the objects and tells the objects to do stuff. *In the labs and assignments we have done, the lab/assignment class has been the driver. Class - ANSWER : *Has attributes *Has a constructor whish is used to intialize attributes *Has other methods *Template for creating objects *Creates a new complex data type EXAMPLE: blueprints for a house
Written for
- Institution
- CSE 1321
- Course
- CSE 1321
Document information
- Uploaded on
- June 23, 2024
- Number of pages
- 6
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
cse 1321
-
cse 1321 final study guide classes and oop
Also available in package deal