FIT3077 Lecture 3: Principles of OO Analysis & Design

56 views2 pages
Principles of OO Analysis & Design
What is OO Design?
No sharp boundary between analysis and design
Conceptual - Analysis
Specificaon - Analysis & Design
Implementaon - Design
Key Ideas in OO Design
Abstraction
The essenal characteriscs of an object that disnguish it from all other kinds of object and thus
provide well defined conceptual boundaries, relave to perspecve of the viewer
Reduction of dependencies
Dependency : when a change in some element of soware may cause in another element of
soware
Cause of maintenance problems
Less dependencies the beer
Open/Close Principle
Classes should be open for extension ( add funconality) but closed for modificaon
Principles of OO Design
Encapsulation
Process compartmentalizing the elements of an abstracon that encapsulates its structure
and behaviour
Serves to separate the contractual interface of an abstracon from its implementaon
Connascence
Between two soware elements they used for some related purpose
A change in one would cause a change in another
Stac Connascence : can be assessed from the code/structure of the classes
Dynamic Connascence: based on the execuon paern of the running code
Use encapsulaon to manage connascence
Guidelines:
Minimise overall connascence by breaking the system into encapsulated components
Minimise any connascence with crosses encapsulaon boundaries
Maximise the connascence within encapsulaon boundaries
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

Document Summary

The esse(cid:374)(cid:415)al (cid:272)hara(cid:272)teris(cid:415)(cid:272)s of a(cid:374) o(cid:271)je(cid:272)t that dis(cid:415)(cid:374)guish it fro(cid:373) all other ki(cid:374)ds of o(cid:271)je(cid:272)t a(cid:374)d thus pro(cid:448)ide (cid:449)ell de (cid:374)ed (cid:272)o(cid:374)(cid:272)eptual (cid:271)ou(cid:374)daries, rela(cid:415)(cid:448)e to perspe(cid:272)(cid:415)(cid:448)e of the (cid:448)ie(cid:449)er. Depe(cid:374)de(cid:374)(cid:272)(cid:455) : (cid:449)he(cid:374) a (cid:272)ha(cid:374)ge i(cid:374) so(cid:373)e ele(cid:373)e(cid:374)t of so(cid:332)(cid:449)are (cid:373)a(cid:455) (cid:272)ause i(cid:374) a(cid:374)other ele(cid:373)e(cid:374)t of so(cid:332)(cid:449)are. Classes should (cid:271)e ope(cid:374) for e(cid:454)te(cid:374)sio(cid:374) (cid:894) add fu(cid:374)(cid:272)(cid:415)o(cid:374)alit(cid:455)(cid:895) (cid:271)ut (cid:272)losed for (cid:373)odi (cid:272)a(cid:415)o(cid:374) Pro(cid:272)ess (cid:272)o(cid:373)part(cid:373)e(cid:374)talizi(cid:374)g the ele(cid:373)e(cid:374)ts of a(cid:374) a(cid:271)stra(cid:272)(cid:415)o(cid:374) that e(cid:374)(cid:272)apsulates its stru(cid:272)ture a(cid:374)d (cid:271)eha(cid:448)iour. Ser(cid:448)es to separate the (cid:272)o(cid:374)tra(cid:272)tual i(cid:374)terfa(cid:272)e of a(cid:374) a(cid:271)stra(cid:272)(cid:415)o(cid:374) fro(cid:373) its i(cid:373)ple(cid:373)e(cid:374)ta(cid:415)o(cid:374) Bet(cid:449)ee(cid:374) t(cid:449)o so(cid:332)(cid:449)are ele(cid:373)e(cid:374)ts the(cid:455) used for so(cid:373)e related purpose. A (cid:272)ha(cid:374)ge i(cid:374) o(cid:374)e (cid:449)ould (cid:272)ause a (cid:272)ha(cid:374)ge i(cid:374) a(cid:374)other. Sta(cid:415)(cid:272) co(cid:374)(cid:374)as(cid:272)e(cid:374)(cid:272)e : (cid:272)a(cid:374) (cid:271)e assessed fro(cid:373) the (cid:272)ode/stru(cid:272)ture of the (cid:272)lasses. D(cid:455)(cid:374)a(cid:373)i(cid:272) co(cid:374)(cid:374)as(cid:272)e(cid:374)(cid:272)e: (cid:271)ased o(cid:374) the e(cid:454)e(cid:272)u(cid:415)o(cid:374) pa(cid:425)er(cid:374) of the ru(cid:374)(cid:374)i(cid:374)g (cid:272)ode. Mi(cid:374)i(cid:373)ise o(cid:448)erall (cid:272)o(cid:374)(cid:374)as(cid:272)e(cid:374)(cid:272)e (cid:271)(cid:455) (cid:271)reaki(cid:374)g the s(cid:455)ste(cid:373) i(cid:374)to e(cid:374)(cid:272)apsulated (cid:272)o(cid:373)po(cid:374)e(cid:374)ts. Mi(cid:374)i(cid:373)ise a(cid:374)(cid:455) (cid:272)o(cid:374)(cid:374)as(cid:272)e(cid:374)(cid:272)e (cid:449)ith (cid:272)rosses e(cid:374)(cid:272)apsula(cid:415)o(cid:374) (cid:271)ou(cid:374)daries. Measure the i(cid:374)terrelated(cid:374)ess of the (cid:373)ethods i(cid:374) the e(cid:454)ter(cid:374)al i(cid:374)terfa(cid:272)e of (cid:272)lass.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers