Slide 1

bouncerarcheryΤεχνίτη Νοημοσύνη και Ρομποτική

14 Νοε 2013 (πριν από 3 χρόνια και 11 μήνες)

102 εμφανίσεις

Computer Science

1

Areas in Computer Science


Software Engineering


Human Computer Interaction


Human Robot Interaction


Graphics


Game Development and Design


Theory


Artificial Intelligence


Etc

2

Theory


Finding algorithms


Efficiency


Correctness


Proving that efficient algorithm does not exist


Proving that no solution exists

3

Software Engineering


Make software development process more
effective and efficient


Look at coding cycle


Look at development cycle


Develop tools


Develop design techniques


Develop team organization structures

4

Coding Cycle


Edit, compile, run


Debugging


Refactoring


Renaming of code


Moving code


Etc


Integrated Development Environment (IDE)

5

Design of Code/Classes


Inheritance (is
-
a)


Containment (has
-
a)


Encapsulation


Polymorphism


Goals:


Code reuse


Code robustness


Minimize code duplication

6

Design of Applications


Goal:


High Coherence


Each class represents single object


No ‘extra’ instance variables and methods


Low Coupling


Minimal linking between classes


System design: M(odel) V(iew) C(ontroller)


Use of design patterns

7

Design Pattern


Object oriented solution to a common
problem


Elements of design pattern


Pattern name


Problem description


Solution


Consequences

8

Observer
-

Description


… for example, many GUI toolkits separate the
presentation aspects from the data … Both a
spreadsheet object and a bar chart object can
depict information in the same application
data object using different
presentations…when user changes
information in spreadsheet the bar chart
reflects the changes immediately…

9

Solution
-

Observer

10

Singleton
-

Description


It’s important for some classes to have exactly
one instance. Although there can be many
printers in a system, there should be only one
printer spooler. There should be only one file
system and one window manager …

11

Solution
-

Singleton

12

Strategy
-

Description

Many algorithms exist for breaking a stream of
text into lines. Hard
-
wiring all such algorithms
into the classes that required them isn’t
desirable for several reasons …

13

Strategy
-

Solution

14

Benefits of Design Patterns


Solutions that have been shown to work


Easy to maintain


Accomplishes OO goals such as


Encapsulation


Cohesion


Well
-
known standard solutions


Easy to recognize

15

Examples of Design Patterns


Adapter


Decorator


Singleton


Observer


Mediator


Singleton


Strategy

16