CMSC OOPS MIDTERM

studied byStudied by 1 person
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 120

flashcard set

Earn XP

Description and Tags

121 Terms

1
Object Oriented Programming
Programming by organizing data and code into objects; programming by using Object Oriented CS principles
New cards
2
Object
-Abstraction of a person, place, or thing
New cards
3
-Can know things, do things, or send messages to other objects or methods

New cards
4
Class
-Definition of a set of similar objects
New cards
5
-Template for defining and creating objects

New cards
6
-Name, list of attributes, list of methods

New cards
7
What makes a language an object oriented language?
-Provide support for classes
New cards
8
-Allow the creation of objects (instances of classes)

New cards
9
-Provide a mechanism for sending messages to objects

New cards
10
-Support OOP principles

New cards
11
OOP Principles
-Abstraction
New cards
12
-Encapsulation

New cards
13
-Inheritance

New cards
14
-Polymorphism

New cards
15
Computer Science Principle
Concept that has been shown over time that it can be applied in many areas of computer science as a part of a good solution
New cards
16
Abstraction
Representation of a real thing with something not real
New cards
17


New cards
18
-Real world: map

New cards
19
-CS: representing letters as numbers

New cards
20
Binding
Action of associating something with a specific item
New cards
21


New cards
22
-Real world: address to house, name to child

New cards
23
-CS: variable name to memory location, type with variable

New cards
24
Encapsulation
Hiding how something works
New cards
25


New cards
26
-Real world: car engine, computer

New cards
27
-CS: function that performs a service, creating an object that know things (and hiding how it does so)

New cards
28
Data Representation
Representing the information about real world data in a systemized way
New cards
29


New cards
30
-Real world: sheet music, braille

New cards
31
-CS: ASCII code, objects

New cards
32
Reuse
Using a particular technique, concept, or systems more than once
New cards
33


New cards
34
-Real world: legos

New cards
35
-CS: software libraries, methods of objects

New cards
36
Pattern
Template that can be used to solve problems
New cards
37


New cards
38
-Real world: dress pattern

New cards
39
-CS: system architecture patterns, patterns of arrangements of objects in an application

New cards
40
Polymorphism
Using same name to refer to similar functions in different classes of objects
New cards
41


New cards
42
-Real world: door handles / opening a door

New cards
43
-CS: methods with same names in different classes

New cards
44
Inhereitance
When parents pass on characteristics to children (reuse)
New cards
45


New cards
46
-Real world: children who look like parents

New cards
47
-CS: parent class passes on attributes and methods to child class

New cards
48
Separation of Concerns
Assigning responsibilities to the entity where they belong and not mixing the responsibilities between entities
New cards
49


New cards
50
-Real world: organizational responsibilities

New cards
51
-CS: separation into packages, method that does only one thing

New cards
52
UML
-Unified Modeling Language
New cards
53
-Notation for documentation of Object Oriented designs

New cards
54
UML Class Diagram Notation (Parts of Diagram)
-Name
New cards
55
-Attributes

New cards
56
-Methods

New cards
57
Associations UML
-Association: knows about, label, multiplicity ("0..*")
New cards
58
-Aggregation: "HAS A," parts are not deleted when the whole is deleted

New cards
59
-Composition: "IS A," parts are deleted when the whole is deleted

New cards
60
Inheritance UML
-"IS-A" relationship
New cards
61
-Generalization -\> specialization

New cards
62
-Parent -\> child

New cards
63


New cards
64
-Super class -\> sub class

New cards
65
Interface UML
-Specification of a group of methods that work together to do something
New cards
66
-Implement is a promise to implement the methods of the interface

New cards
67
Random Class
-java.util
New cards
68


New cards
69
Methods:

New cards
70
-Random()

New cards
71
-float nextFloat()

New cards
72
-int nextInt()

New cards
73
-int nextInt(int num)

New cards
74
Random Class Sample Code
Random generation \= new Random();
New cards
75


New cards
76
//number 1 - 10

New cards
77


New cards
78
int num \= generation.nextInt(10) + 1;

New cards
79
GUI Component
Object that defines a GUI element that displays on the screen and allows the user to interact with the system
New cards
80


New cards
81
Ex:

New cards
82
-Container

New cards
83
-Button

New cards
84
-Text Field

New cards
85
-Label

New cards
86
-Check Boxes

New cards
87
-Radio Buttons

New cards
88
-Menus

New cards
89
GUI Event
Object that represents some occurrence (user action) in which we may be interested
New cards
90


New cards
91
Ex:

New cards
92
-Key press

New cards
93
-Mouse click

New cards
94
-Mouse movement

New cards
95
GUI Listener
Object that waits for an event to occur and responds in some way when it does (written by developer)
New cards
96
Building a GUI
1. Add components for display
New cards
97
2. Write listeners and connect them to events

New cards
98
Swing Frame
-Container: can hold other components
New cards
99
-JFrame

New cards
100
Swing Panel
-Container: can hold other components
New cards

Explore top notes

note Note
studied byStudied by 10 people
697 days ago
4.5(2)
note Note
studied byStudied by 52 people
316 days ago
5.0(2)
note Note
studied byStudied by 168 people
1009 days ago
5.0(1)
note Note
studied byStudied by 52 people
509 days ago
5.0(1)
note Note
studied byStudied by 21 people
213 days ago
5.0(1)
note Note
studied byStudied by 20 people
900 days ago
5.0(1)
note Note
studied byStudied by 74 people
724 days ago
5.0(2)
note Note
studied byStudied by 57275 people
701 days ago
4.8(405)

Explore top flashcards

flashcards Flashcard (67)
studied byStudied by 22 people
824 days ago
5.0(2)
flashcards Flashcard (27)
studied byStudied by 17 people
519 days ago
4.0(1)
flashcards Flashcard (49)
studied byStudied by 8 people
837 days ago
5.0(1)
flashcards Flashcard (20)
studied byStudied by 1 person
301 days ago
5.0(1)
flashcards Flashcard (30)
studied byStudied by 18 people
679 days ago
5.0(1)
flashcards Flashcard (37)
studied byStudied by 2 people
295 days ago
4.0(1)
flashcards Flashcard (55)
studied byStudied by 1 person
779 days ago
5.0(1)
flashcards Flashcard (47)
studied byStudied by 9 people
151 days ago
5.0(1)
robot