Lecture 1 Flashcards

1
Q

Procedural program basic anatomy.

A

There are functions/methods and variables.
The functions/methods call each other.
As these get larger, they can become more unmanageable (spaghetti code).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are some basic ideas of object-oriented programming?

A

Handle complexity by decomposing things.
Make ‘objects’ that contain data and related behaviors.
This works very well for large-scale systems that are maintainable and extendable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Basic anatomy of object oriented programming.

A

Methods and variables within classes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Questions to understand related to object-oriented programming.

A

What things should be classes and objects?
How do objects interact?
How can we design without implementing the design?
How can the design be robust, reusable, and adaptable?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Definition of classes and objects.

A

Class: A blueprint on how to create an object.
Object: An instance of a class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a field or attribute?

A

Related data. May include the state of an object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a constructor?

A

Makes an object with initial attributes.
Think __init__ in python.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a method?

A

Implements related behaviors.
Some describe real world behaviors.
Some describe system behaviors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How does modelling work with programming?

A

Models group things (objects) with similar enough characteristics into the same type. How similar they are depends on the application.

In programming, objects of the same type are made with the same class. The class defines fields and operations.

All objects of the same type have the same fields and operations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Can objects of the same type have different fields and operations?

A

No*

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Categories of objects.

A

Entity: Real things. Like animals, people, numbers, etc.
Container: A data structure for storage of entities.
Interface: Communicates with the “outside world”. Such as a printer, file, or console.
Control: Organize computations. The main program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Entity Objects.

A

Can be physical, conceptual, or event/state-change objects. People, buildings, agreements, abstractions, purchases, sales, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Container Objects.

A

Contains some number of entities.
Implemented with data structures.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Interface Objects.

A

Handles communication between software and externals. Such as people, other hardware, etc.
I.e. GUI.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Control Objects.

A

Controls sequence of execution. I.e. Drivers, main program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Methods.

A

Things an object can do or have done to it.
Accessors/Getters.
Mutators/Setters.
Hybrid (both access and mutate). Note Hybrid is discouraged by modern software approaches.

17
Q

Software development process.

A

Requirements: Find what it needs to do.
Design: Make a plan to meet requirements.
Implementation: Write code to meet design.
System Testing and Verification: Show it meets requirements.
Maintenance: Install, deliver, update, upgrade, etc.

18
Q

Requirements stage of software design.

A

A written document in natural human language.
Explains the purpose in some detail. Only essential concepts with no code.
Given in class, but negotiated with clients.

19
Q

Interface meaning.

A

Several meanings in this course.
A way to work with an object using its methods.
A way to connect to the real world.
A way to describe a group of behaviors without committing to a common class.