Home
Explore
Exams
Search for anything
Login
Get started
Home
Science
Communication Science
CMSC OOPS MIDTERM
0.0
(0)
Rate it
Studied by 1 person
Learn
Practice Test
Spaced Repetition
Match
Flashcards
Card Sorting
1/120
Earn XP
Description and Tags
Communication Science
University/Undergrad
Add tags
Study Analytics
All
Learn
Practice Test
Matching
Spaced Repetition
Name
Mastery
Learn
Test
Matching
Spaced
No study sessions yet.
121 Terms
View all (121)
Star these 121
1
New cards
Object Oriented Programming
Programming by organizing data and code into objects; programming by using Object Oriented CS principles
2
New cards
Object
-Abstraction of a person, place, or thing
3
New cards
-Can know things, do things, or send messages to other objects or methods
4
New cards
Class
-Definition of a set of similar objects
5
New cards
-Template for defining and creating objects
6
New cards
-Name, list of attributes, list of methods
7
New cards
What makes a language an object oriented language?
-Provide support for classes
8
New cards
-Allow the creation of objects (instances of classes)
9
New cards
-Provide a mechanism for sending messages to objects
10
New cards
-Support OOP principles
11
New cards
OOP Principles
-Abstraction
12
New cards
-Encapsulation
13
New cards
-Inheritance
14
New cards
-Polymorphism
15
New cards
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
16
New cards
Abstraction
Representation of a real thing with something not real
17
New cards
18
New cards
-Real world: map
19
New cards
-CS: representing letters as numbers
20
New cards
Binding
Action of associating something with a specific item
21
New cards
22
New cards
-Real world: address to house, name to child
23
New cards
-CS: variable name to memory location, type with variable
24
New cards
Encapsulation
Hiding how something works
25
New cards
26
New cards
-Real world: car engine, computer
27
New cards
-CS: function that performs a service, creating an object that know things (and hiding how it does so)
28
New cards
Data Representation
Representing the information about real world data in a systemized way
29
New cards
30
New cards
-Real world: sheet music, braille
31
New cards
-CS: ASCII code, objects
32
New cards
Reuse
Using a particular technique, concept, or systems more than once
33
New cards
34
New cards
-Real world: legos
35
New cards
-CS: software libraries, methods of objects
36
New cards
Pattern
Template that can be used to solve problems
37
New cards
38
New cards
-Real world: dress pattern
39
New cards
-CS: system architecture patterns, patterns of arrangements of objects in an application
40
New cards
Polymorphism
Using same name to refer to similar functions in different classes of objects
41
New cards
42
New cards
-Real world: door handles / opening a door
43
New cards
-CS: methods with same names in different classes
44
New cards
Inhereitance
When parents pass on characteristics to children (reuse)
45
New cards
46
New cards
-Real world: children who look like parents
47
New cards
-CS: parent class passes on attributes and methods to child class
48
New cards
Separation of Concerns
Assigning responsibilities to the entity where they belong and not mixing the responsibilities between entities
49
New cards
50
New cards
-Real world: organizational responsibilities
51
New cards
-CS: separation into packages, method that does only one thing
52
New cards
UML
-Unified Modeling Language
53
New cards
-Notation for documentation of Object Oriented designs
54
New cards
UML Class Diagram Notation (Parts of Diagram)
-Name
55
New cards
-Attributes
56
New cards
-Methods
57
New cards
Associations UML
-Association: knows about, label, multiplicity ("0..*")
58
New cards
-Aggregation: "HAS A," parts are not deleted when the whole is deleted
59
New cards
-Composition: "IS A," parts are deleted when the whole is deleted
60
New cards
Inheritance UML
-"IS-A" relationship
61
New cards
-Generalization -\> specialization
62
New cards
-Parent -\> child
63
New cards
64
New cards
-Super class -\> sub class
65
New cards
Interface UML
-Specification of a group of methods that work together to do something
66
New cards
-Implement is a promise to implement the methods of the interface
67
New cards
Random Class
-java.util
68
New cards
69
New cards
Methods:
70
New cards
-Random()
71
New cards
-float nextFloat()
72
New cards
-int nextInt()
73
New cards
-int nextInt(int num)
74
New cards
Random Class Sample Code
Random generation \= new Random();
75
New cards
76
New cards
//number 1 - 10
77
New cards
78
New cards
int num \= generation.nextInt(10) + 1;
79
New cards
GUI Component
Object that defines a GUI element that displays on the screen and allows the user to interact with the system
80
New cards
81
New cards
Ex:
82
New cards
-Container
83
New cards
-Button
84
New cards
-Text Field
85
New cards
-Label
86
New cards
-Check Boxes
87
New cards
-Radio Buttons
88
New cards
-Menus
89
New cards
GUI Event
Object that represents some occurrence (user action) in which we may be interested
90
New cards
91
New cards
Ex:
92
New cards
-Key press
93
New cards
-Mouse click
94
New cards
-Mouse movement
95
New cards
GUI Listener
Object that waits for an event to occur and responds in some way when it does (written by developer)
96
New cards
Building a GUI
1. Add components for display
97
New cards
2. Write listeners and connect them to events
98
New cards
Swing Frame
-Container: can hold other components
99
New cards
-JFrame
100
New cards
Swing Panel
-Container: can hold other components
Load more