11 Pages

Classes___Interfaces

Course: CSC 420, Fall 2009
School: Elon
Rating:
 
 
 
 
 

Word Count: 238

Document Preview

& Classes Interfaces Minimizing Accessibility and Security Holes Introduction Classes and Interfaces are the backbone of Java Good design = usable, robust, and flexible 1. Minimize accessibility 2. Use private data members w/ accessors Minimize Accessibility of Classes and Members Information hiding degree to which the module hides internal data Use multiple modules and keep them hidden!...

Register Now

Unformatted Document Excerpt

Coursehero >> North Carolina >> Elon >> CSC 420

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
& Classes Interfaces Minimizing Accessibility and Security Holes Introduction Classes and Interfaces are the backbone of Java Good design = usable, robust, and flexible 1. Minimize accessibility 2. Use private data members w/ accessors Minimize Accessibility of Classes and Members Information hiding degree to which the module hides internal data Use multiple modules and keep them hidden! Advantages of multi-hidden modules Allows modules to be developed, tested, optimized, and modified individually > SPEED. Eases maintenance > will not harm other modules. Access Control Mechanisms Private Protected Public Rules of Accessibility Make each class or member as inaccessible as possible. TopLevel classes and interfaces = package private or public If a method overrides supermethod, it cannot have lower level accessibility (compiler will catch this) Public should classes rarely have public fields. Except for public static finals. Example Nearly always wrong to have public static final array field //potential security hole Public static final Type[] VALUES = {...}; Better Version: Private static final Type[] PRIVATE_VALUES = {...}; Public static final List VALUES = Collections.unmodifiableList(Arrays.asList(PRIVATE_VA LUES)); Use Private data w/ Accessor methods Use synchronized methods to protect data from corruption. Multi threads may result in altering members concurrently. E...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Elon - CSC - 420
The Open Closed PrincipleOpen for extension, Closed for modificationSay what? Open for extension means that a module/class is easily extended so that the software can grow with the changing needs of the user. Closed for modification means t
Elon - CSC - 420
Use Abstract ClassesMike McGovernDependency Inversion Principle Use Abstract classes when it makes sense to provide a partial implementation. This basically states that high-level components, or classes whose behavior is defined by other "low lev
San Diego State - ART - 448
Alexander Calder in Focus July 28, 2007March 1, 2009View Calder's mobiles, stabiles, drawings and paintings in this small exhibition. These works, dating from 1927 to 1968, demonstrate the artist's development throughout his 50 year career. Calder
Texas San Antonio - CS - 4793
2Neuron Model and Network Architectures12Single-Input Neuronnet input weight output input bias22Transfer Functions32Transfer Functions= (1 + e-n) -142Exercisenet input = ? 1.5 Output = ? 2 3.552Multiple-Input Neuro
Texas San Antonio - CS - 4793
3An Illustrative Example13Apple/Banana Sorter23Prototype VectorsMeasurement VectorPrototype Bananashape p = te xture w eight 1 p1 = 1 1Prototype Apple1 p2 = 1 1Shape: {1 : round ; -1 : eliptical} Texture: {1 : smooth ; -1 : roug
Texas San Antonio - CS - 4793
4Perceptron Learning Rule14Learning Rules Supervised Learning Network is provided with a set of examples of proper network behavior (inputs/targets){ p1, t 1} , { p2, t 2} , . , {pQ,tQ } Reinforcement Learning Network is only provided wit
Texas San Antonio - CS - 4793
5Signal & Weight Vector Spaces15NotationVectors in n.x1Generalized Vectors.x =x2 xnx25Vector Space1. An operation called vector addition is defined such that if x X and y X then x+y X. 2. x + y= y+ x 3. (x + y) + z = x + (y
Texas San Antonio - CS - 4793
6Linear Transformations16Hopfield Network Questions The network output is repeatedly multiplied by the weight matrix W. What is the effect of this repeated operation? Will the output converge, go to infinity, oscillate? In this chapter w
Texas San Antonio - CS - 4793
8Performance Surfaces18Taylor Series ExpansionF ( x ) = F ( x ) +d F( x ) dx2x = x( x x ) ( x x ) + .21 d + -F( x) 2 d x2nx = x1 d + -F( x) n! d x n( x x ) + .x = xn28ExampleF( x ) = exTaylor series of F(x)
Texas San Antonio - CS - 4793
randnum 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52lp 225000 139900 152900 220000 89900 189500 169950 215000 121500 94000 110000 124900 119900 69
California State University, Monterey Bay - CH - 115
Some Common Elements Element Name Aluminum Argon Arsenic Barium Beryllium Boron Bromine Cadmium Calcium Carbon Graphite Diamond Chlorine Chromium Cobalt Copper Fluorine Gold Helium Hydrogen Iodine Iron Krypton Symbol Al Ar As Ba Be B Br Cd Ca C Cl Cr
California State University, Monterey Bay - CH - 104
California State University, Monterey Bay - CH - 104
Students Exempt from the Final Exam Louka S. Abed Steven E. Baer Daniel F. Bouchard Ken Chi Huynh Stephen L. Markowitz Kateri I. McCarthy Leh-Ing Tang Mark Turshen Anxhelina Voskopoja
California State University, Monterey Bay - BIOCHM - 386
California State University, Monterey Bay - BIOCHM - 386
Emanuella kyrak kungfu 268598 ichiro MORE123 ILNG09 lucky26 spell hanny bhala kiara 51748 teferiDocking 90 80 80 90 95 100 95 100 100 90 80 95 90 100Literature report Notebook 250 96 175 100 200 92 250 100 280 94 230 87 150 100 300 92 300 100 250
Berkeley - G - 007
,"UNASSIGN""1000014","1808""1000015","1808""1000016","1904""1000017","1808""1000018","1807""1000019","1808""1000020","1804""1000021","1808""1000022","1804""1000023","1804""1000024","1808""1000025","1806""1000026","1806""1000027","1807"
Berkeley - C - 007
"1000014","1801""1000015","1809""1000016","1901""1000017","1810""1000018","1811""1000019","1902""1000020","1802""1000021","1803""1000022","1804""1000023","1812""1000024","1812""1000025","1805""1000026","1805""1000027","1806""1000028","1
Berkeley - G - 019
Race Vote Totals Candidate/DescriptionTOTREG 344,359DEMREG 148,208REPREG 151,151AIPREG 6,010GRNREG 1,660LIBREG 1,336NLPREG 307REFREG 727DCLREG 34,141MSCREG
U. Houston - CUIN - 3111
W. Alabama - CS - 856
CS 856 - Internet Transport PerformanceCourse Offering: Spring 2004, Martin Karsten (mkarsten@uwaterloo.ca)Seminar Style introductory lectures individual student projects, for example: literature surveys analysis of recent research proposals
W. Alabama - CS - 856
SchedulingAn Engineering Approach to Computer NetworkingOutlineI I I I I I IWhat is scheduling Why we need it Requirements of a scheduling discipline Fundamental choices Scheduling best effort connections Scheduling guaranteed-service connectio
W. Alabama - CS - 856
CS 856 Internet Transport Performance Network Control: Routing & SignallingMartin KarstenSchool of Computer Science, University of Waterloo mkarsten@uwaterloo.ca3-network.fm 1/46 May 20, 2004Martin Karsten - CS 856, Spring 2004ContentsRouti
W. Alabama - CS - 856
IRTF Routing Research Avri Doria (co-editor)Internet Draft Lulea University of Technology Elwyn Davies (co-editor)
W. Alabama - CS - 856
Internet Engineering Task Force J. Manner (ed.)Internet-Draft X. FuExpires: November, 2004 P. Pan
W. Alabama - CS - 856
CS 856 Internet Transport Performance Network Architecture: Mobility, Multicast and OverlaysMartin KarstenSchool of Computer Science, University of Waterloo mkarsten@uwaterloo.ca5-architecture.fm 1/34 Jun 2, 2004Martin Karsten - CS 856, Spring
Maryland - BSCI - 426
Biochemical and Biophysical Research Communications Volume 346, Issue 3, 4 August 2006, Pages 829-839Hypotonic shock: 2-fold dilutionScanning EM of dendritic cells (immune system)
Maryland - BSCI - 426
The figures in this presentation were taken from: Ionic Channels of Excitable Membranes by Bertil Hille (Sinauer) Ion selectivity in membrane permeation by Sally Krasne in "Membrane Physiology" edited by Andreoli, hoffman & Fanestil (Plenum)
Maryland - BSCI - 426
ARTICLEImportance of Hydration and Dynamics on the Selectivity of the KcsA and NaK ChannelsSergei Yu. Noskov1,2 and Benot Roux11Institutefor Molecular Pediatric Sciences, Gordon Center for Integrative Sciences, University of Chicago, Chicago, I
Maryland - BSCI - 426
Annu. Rev. Biophys. Biomol. Struct. 2005. 34:15371 doi: 10.1146/annurev.biophys.34.040204.144655 Copyright c 2005 by Annual Reviews. All rights reserved First published online as a Review in Advance on March 3, 2005ION CONDUCTION AND SELECTIVITY +
Maryland - BSCI - 426
letters to nature26. Wineld, D. A. The postnatal development of synapses in the visual cortex of the cat and the effects of eyelid closure. Brain Res. 206, 166171 (1981). 27. Vees, A. M., Micheva, K. D., Beaulieu, C. & Descarries, L. Increased numbe
Dickinson State - ECE - 433