Docsity

Lecture1 introduction, Slides of Java Programming

Partial preview of the text

Download Lecture1 introduction and more Slides Java Programming in PDF only on Docsity!

Software Design

Mihaela Dinsoreanu, PhD

Contact: room D01, Baritiu 26-

E-mail: [email protected]

Housekeeping Details

  • (^) Time & Location:
    • (^) See Schedule on www.ac.utcluj.ro
  • (^) Prerequisites:
    • (^) Software Engineering Course
    • (^) Programming Techniques Course
  • (^) Grading:
    • (^) Project 20%
    • (^) Lab 20%
    • (^) Final Exam 60%

Housekeeping continued..

  • (^) Lab sessions are compulsory
    • (^) Maximum 3 absences allowed (can be caught up)
    • (^) Only one assignment/week can be presented
    • (^) Attend the lab sessions only with your group
  • (^) 2 types of projects
    • (^) Common (1 semester)
    • (^) Research-oriented (can be continued as DS projects and Diploma

projects)

  • (^) Data fusion
  • (^) Knowledge representation (adaptive)
  • (^) Machine learning and reasoning
  • (^) Data mining, text mining
  • (^) Course files

http://users.utcluj.ro/~dinso/PS2016…to be set up

References

  • (^) Software Architectures
    • (^) Ian Gorton, Essential Software Architecture, Springer, second ed. 2011.
    • (^) Taylor, R., Medvidovic, N., Dashofy, E., Software Architecture: Foundations, Theory, and Practice, 2010, Wiley.
    • (^) Len Bass, Paul Clements, Rick Kazman, Software Architecture in Practice, 3rd^ edition,
    • (^) David Patterson, Armando Fox, Engineering Long-Lasting Software: An Agile Approach Using SaaS and Cloud Computing, Alpha Ed.
    • (^) Buschmann, Frank, Regine Meunier, Hans Rohnert, Peter Sornmerlad, and Michael Stal. 2001. Pattern-oriented system architecture, volume 1: A system of patterns. Hoboken, NJ: John Wiley & Sons. [POSA book]
    • (^) Fowler Martin, Patterns of Enterprise Application Architecture, Addison-Wesley Professional, 2002
  • (^) Design Patterns
    • (^) E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns. AddisonWesley,
      1. [GoF]
    • (^) Craig Larman, Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development (3rd Edition), Prentice Hall, 2004, ISBN: 0131489062
  • (^) Courses
    • (^) B. Meyer (ETH Zurich)
    • (^) G. Kaiser (Columbia Univ. NY)
    • (^) I. Crnkovic (Sweden)
    • (^) (Univ. of Copenhagen)
    • (^) R. Marinescu (Univ. Timisoara)
    • (^) SaaS (Stanford)

Why study Software Architecture?

  • (^) Every software intensive system has a software

architecture

  • (^) Software architecture is an increasingly important area of practice, education, and research
  • (^) Possible reasons
  • (^) Professional
  • (^) Academic
  • (^) Scientific

CNN Money Best Jobs 2015 [http://money.cnn.com/pf/best- jobs/2015/list/]

Software Design Techniques

What are Software Design Techniques?

 (^) SD Techniques provide a set of practices for analysing, decomposing, and modularising software system architectures  (^) characterized by structuring the system architecture on the basis of its components rather than the actions it performs.

Learning SD Techniques Junior Developer ->Rules

  • (^) algorithms, data structures and programming languages
  • (^) write programs, although not always good ones Senior Developer ->Principles
  • (^) software design & programming paradigms with pros and

cons

  • (^) importance of cohesion, coupling, information hiding,

dependency management etc.

Master ->Patterns

  • (^) study the "design of masters"

What do you need?

Knowledge

  • (^) Is obtained by reading book or attending lectures – terminology, concepts, principles, methods, and theories

Understanding

  • (^) is obtained from using your knowledge for activities in the course, e.g., practical or theoretical exercises, assignments, projects, discussions

Skills

  • (^) are obtained by actively using knowledge and understanding of the subject matter – working hard is one secret of becoming skillful

Today’s outline

  • (^) Object Oriented Concepts Review
    • (^) Classes
    • (^) Objects
    • (^) Relationships: inheritance, composition
    • (^) Abstract classes, Interfaces
    • (^) Polymorphism
    • (^) Nested classes

How to declare a class (java)

class ClassName [ extends ParentName implements

InterfaceName(s)]

[modifier(s)] type attribute1 ; … [modifier(s)] return_type method1 (param_list) {//method body here} } Access modifiers: public, protected, private “Mutability” modifier: final “Scope” modifier: static

Access modifiers in Java

The Person class

//code here

class Person {

final int birthYear;

String firstName, lastName;

boolean employed;

static int nrOfLegs;

//constructor(s)

//setters & getters

static final

Overloading methods

Define in a class methods with the same name and different:

  • (^) Number of parameters
  • (^) Type of parameters
  • (^) Return type

class Person {

public int calculateAge() {

return Date.currentYear() – birthYear;}

public int calculateAge (int year ) {

return year – birthYear;}

public float calculateAge() {

return Date.currentYear() – birthYear;}