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
École, étude et sujet
- Établissement
- CSE 1321
- Cours
- CSE 1321
Infos sur le Document
- Publié le
- 23 juin 2024
- Nombre de pages
- 6
- Écrit en
- 2023/2024
- Type
- Examen
- Contient
- Questions et réponses
Sujets
- cse 1321
-
cse 1321 final study guide classes and oop
Document également disponible en groupe