M 2018 Software Engineering Design & Construction
Summer Term 2018
Software Engineering Design & Construction
Dr. Michael Eichberg Fachgebiet Softwaretechnik Technische Universit?t Darmstadt
A Critical View on Inheritance
A Critical View On Inheritance
Inheritance is the main built-in variability mechanism of OO languages.
2
Desired Properties
(of Programming Languages)
? Built-in support for OCP ? Good Modularity ? Support for structural variations ? Variations can be represented in type declarations
3
Variation of selection functionality of table widgets.
Desired Properties By Example
class TableBase extends Widget { TableModel model; String getCellText(int row, int col){ return model.getCellText(row, col); } void paintCell(int r, int c){ getCellText(row, col) ... }
} abstract class TableSel extends TableBase {
abstract boolean isSelected(int row, int col); void paintCell(int row, int col) { if (isSelected(row, col)) ... } } class TableSingleCellSel extends TableSel { int currRow; int currCol; void selectCell(int r, int c){ currRow = r; currCol = c; } boolean isSelected(int r, int c){ return r == currRow && c == currCol; } } class TableSingleRowSel extends TableSel { int currRow; void selectRow(int row) { currRow = row; } boolean isSelected(int r, int c) { return r == currRow; } } class TableRowRangeSel extends TableSel { ... } class TableCellRangeSel extends TableSel { ... }
4
Non-Reusable, Hard-to-Compose Extensions
An Extract from Java's Stream Hierarchy
InputStream
File InputStream
Piped InputStream
ByteArray InputStream
5
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- java files copyright © tutorialspoint
- exploring java i o unit 4 exploring java i o
- serial communication in java with example program idc online
- java s input output github pages
- long n method example tutorialspoint
- intermediate programming adelphi university
- java files and i o
- input output classes java and oop
- chapter 20 streams and binary input output
- binary i o university of california san diego
Related searches
- types of software engineering models
- software engineering process model
- software engineering models pdf
- engineering design calculations
- introduction to engineering design pdf
- engineering design team roles
- faa engineering design report
- engineering design process template pdf
- engineering design cost per hour
- engineering design with polymers and composites
- 12 step engineering design process
- 6 step engineering design process