Misc Flashcards

1
Q

4 pillars of OOP

A

Abstraction
Encapsulation
Inheritance
Polymorphism

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

Abstraction

A

Avoid repeating code by abstracting concepts so same code can be used multiple times, use classes and variables to represent complex code simply

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

Encapsulation

A

Keep fields in class private and provide access through public methods (eg. getter and setter methods). Public variables bad if you want to use the same names in different class, and for large code base it’s good practice to keep things separate so you don’t need to know what every variable is called in order to make a new one

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

Inheritance

A

Can create classes (child classes) that inherit attributes of existing ones (parents). Avoids repeating code, can build from a very abstract class to add more specifics in a child class, but still keep the value of abstraction in the parent

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

Polymorphism

A

Method overriding - child class can override method from parent with its own version with same signature, and that child version will be used instead of the parent
Method overloading - can have two methods of the same name in one class, just with different signatures (take in different parameters)

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

Java Interface

A

Completely abstract class - groups related methods but does not implement them (interface contains only signatures, not bodies). Have to implement the interface within a class. Good for security (can hide certain details of an object), also makes multiple inheritance (inheritance from multiple parent classes) possible in Java.

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

Software development lifecycle

A

Planning
Analysis
Design
Development
Testing
Integration
Maintenance

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

Planning

A

Determine objectives and scope of project, set schedule, figure out what resources are needed

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

Analysis

A

Determine needs of users, evaluate alternatives/existing methods or prototypes, define requirements for end product (basically, define specifications for detailed idea of what project will involve)

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

Design

A

Design system and user interfaces, figure out what network will be used/requirements for the network, design structure of any necessary databases, and what programming languages to use
(Basically UX design and architecture of code)

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

Development

A

Actually write code to build the thing, using prior designs and specifications as guidelines

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

Testing

A

Test the code/system as a whole, make sure it does what’s intended and doesn’t introduce unforeseen problems

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

Integration

A

Integrate separate pieces of the project together and situate in working environment (basically putting together all the parts that individual teams might work on, should be usable by end users at end of this stage)

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

Maintenance

A

Fix bugs that come up (both from user reports and things left over from before launch)
End with idea that this is a cycle for a reason - every time features are added after the main launch they go through a version of this process again

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

Sudoku project

A

Used Java and processing (Java gui library) to build a sudoku editor.
Simple object oriented programming project, did it when I was just learning Java a while ago
I learn best by doing and figuring out new aspects of something as they come up - started with totally wrong idea and rebuilt with a better structure
Has a couple classes - cell, game set, and actual game
Pulls random games from a file of 1 million random ones (loads 100 at a time)

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

Fire boy and water girl project

A

Object oriented C++ game
Uses model view controller architecture - divides interaction between user input, computations/game logic, and visual output
Many classes and structs to represent the game elements