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ɏ츯c'Q&gduG!a3eίo6r6XvCP3L OghѬctQ5]@lj׹:+{ԽQLu߭+UrF:tOh4?Ir Fy{a" } ^%Y)1>x2nN><t'߹iOUN2qZ%n{yc4=;"??OgWWټi3{E|쉝vo.8q=T?v4Ǭ/-Eȋr}:vbɭ5&wGj.ğc^poO<Ǜq&˕q75ywXBxAEk2 IHuNTgY\=5%鑪GCmhoFr%)U6Wܯi k'^/QtVo~Nn샥ߑߓvAɟ&x:?9G&>s샥{90; }~Ni{"?~L :?>s4gtc'=Cd~÷<</bE#kȶI]{)ؚzkzeE.t)FB׹uWV^y:)kewZcaw)`4iE-GDe2~"ݿy-|!k;ce_k;3:f'&93>~|LEhgŝ?_;zoϥc}㚨߱qt9Dw+~ċ|z6֊OWױpEUcxѢpFWdl(  / 0|DTimes New Roman@b@bLb0pbpb 0DArial Blackman@b@bLb0pbpb 0" DTahomalackman@b@bLb0pbpb 0"0DMonotype Sorts@b@bLb0pbpb 0@DArialpe Sorts@b@bLb0pbpb 0"  @n?" dd@  @@`` 4,p-Z        /X$zR$bؙ iԌV g?zc $ @8 g4AdAd|b 0tbV (ppp@ g4KdKd|b 0tb p@ pp?T+ @Tim Margush, University of AkronOl;ST: Java @Tim Margush, University of AkronCup 4: Java ClassesSpecial Topics: JavaDefining a Class Use a separate file for each class Use the class keyword Give a name to your class Define the class members data members methods$llObjectsA class is a definition of the methods and variables that will ultimately be associated with objects of that class Objects must be instantiated using new together with the class name Programs refer to objects through variables that reference the objects  Data MembersfInstance variables Each object (instance of a class) has its own copy of the class' instance variables$TT mClass variables A class has only one copy of each class variable The keyword static declares a class variable$^^MethodsInstance method Invoked from an object Can use object's instance variables Includes a this variable that is a reference to the calling object$~~ dClass method Declared as static Cannot reference instance variables Does not include a this variable$ X X ConstructoraCalled by new when an object is created default conversion copy No return type Same name as class6("("Access Modifierscdefault any class in the same package public any class anywhere private no access outside the classl protected any class in the same package any sub-class anywhere Classes belong to the default package unless otherwise classified6 5B 5B InheritanceClass subClass extend superClass subClass contains all variables and methods of the superClass subClass inherits only public or protected members of superClass protected members are inherited only if subClass and superClass are in the same package Inheritance refers to accessibilityl!X$! 60X$) . (  <Interfaces - Definingpublic interface interfaceName A collection of constants and abstract methods constants are always public, static, and final so these are not specified methods are public and abstract, so these are not specified without public, package access only6N$N$  Interfaces - Implementingclass myImp implements myInterface all interface constants are available all interface methods must be defined if some methods are omitted, the class must be specified as abstract Java does not allow multiple inheritance; Interfaces are the next best thingH#LEM#LEM, / !"#$%&'()   ` ^WN̙f` ^WNff3` 999MMM` ^WNf` ff33` ff33` ^WN̙f>?" dd@(?zdd@ y x@" `  n?" dd@   @@``@n?" dd@  @@``PR   @ ` ` p>> ]U(    C XA@C:\WINDOWS\DESKTOP\JavaBack.jpg  s *v 0` v T Click to edit Master title style! !   c $dv @ v RClick to edit Master text styles Second level Third level Fourth level Fifth level!     S  s *v Tt v E* 2  s *$v Tt  v G*(2  s *v T@t v I4-*(2Z  B޽h))? ? ^WNff3 Javaxx.potd   0 ( &`    C XA@C:\WINDOWS\DESKTOP\JavaBack.jpg  s *#v @@ v T Click to edit Master title style! !  c $d$v @  v W#Click to edit Master subtitle style$ $  s *$v T v E* 2^WN  s *$%v T  v G*(2^WN  s *%v T@ v G*(2^WNZ  B޽h))? ? ^WNff3 0 P.(    0n P   v Y*   0o    v [* d  c $ ?  v  0do  @ v RClick to edit Master text styles Second level Third level Fourth level Fifth level!     S  6o `P  v Y*   6$p `  v [* H  0޽h ? ̙33 @4(      0$m P   v =*   0m    v ?*   6m `P  v =*   6Dn `  v ?* H  0޽h ? ̙33 x ( K l  C %v PP  v r  S D&v ` p v   0&v0 pj VDr. Tim Margush Department of Mathematics and Computer Science The University of AkronW(2WH  0޽h ? ^WNff3  ph(  hl h C $s0`   l h C s@  H h 0޽h ? ^WNff3  p(  pl p C Dt0`   l p C t@  H p 0޽h ? ^WNff3L  l( 0 ll l C v0`   l l C v   l l C Dw8 @  H l 0޽h ? ^WNff3L  t(  tl t C dx0`   l t C H   l t C TI8 @  H t 0޽h ? ^WNff3  x( $  xl x C 4K0`   l x C tJ@ v H x 0޽h ? ^WNff3L  |( q |l | C K0`   l | C J   l | C K8 @  H | 0޽h ? ^WNff3  ( \1X l  C TL0`   l  C L@  H  0޽h ? ^WNff3   ( X l  C 4N0`   l  C N@  H  0޽h ? ^WNff3   0(  l  C O0`   l  C P@  H  0޽h ? ^WNff3 0 x`( X R  3    v~  C dr @  v  H  0޽h ? ̙33x 0 80(  R  3    6  C s @   class ClassName{ methods and variables } Classes, methods, and variables can be protected in various ways to have limited or global scope. More of this later. H  0޽h ? ̙33 0 _W(  R  3    ]  C $v @   A class can be thought of as an object factory. Each object instantiated from a class will have its own instance variables. There may be class variables that are shared by all objects and exist before any objects are created. Think of these as residing in the factory itself. Objects are always instantiated dynamically using new. Objects are garbage collected when there are no references remaining to the object (and the garbage collection thread gets around to taking out the garbage).H  0޽h ? ̙33 0 b(  R  3      C w @   p\In addition to deciding whether a variable is an instance or class variable, you may want to specify the scope. Scope is determined by a keyword in front of the declaration. public, protected, private, or none specified (package scope) are the possibilities. You might also want to declare some variables as final if they are intended as constants.H  0޽h ? ̙33 0 h`(  R  3    f  C I @   Class functions may be called even though no objects of the class exist. As a result, they may only refer to class variables. The same protection keywords can be applied to methods. If a method is final, it cannot be overridden in a subclass.H  0޽h ? ̙33 0 @K(  R  3      C TR @   Y#If you do not include a constructor, a default constructor is created. Conversion constructors are useful if another data type is related to the class type being defined. Copy constructors are needed to create a new object that is a duplicate of an existing object. There are no destructors. H  0޽h ? ̙33 0 P-(  R  3      C S @   ;'Access modifiers set the scope of variables and methods. Scope tells where an identifier is meaningful. If you do not code an access modifier, you get package scope (default scope). The default package is the collection of files in the current directory when you compile or execute your program.H  0޽h ? ̙33Q 0  `( 8}@`u@ R  3      C R @   yApp objects ultimately extend Object (but this is never explicitly written). Note the difference - contains vs. inherits!l H  0޽h ? ̙33 0 p^( 8}@`u@ R  3      C tS @   lXInterfaces are one answer to Java's lack of multiple inheritance (more than one parent).H  0޽h ? ̙33`  0  (  R  3      C  @   Interfaces cannot be instantiated, but declaring that a class implements an interface is a guarantee that that class (or a subclass) will implement the interface methods.H  0޽h ? ̙33rl`%+O }/0U2546i8:<>@BDYFHLOJRMU2XZ\p _)bOh+'0TRx0 DP p | Cup x: Java Classeso Tim Margush,Class notes for 3460:289 ST:Java, Fall 19987C:\Program Files\Microsoft Office\Templates\Javaxx.pot Tim Margush4m Microsoft PowerPointoso@%f@ hTͽ@ ݽGPoM  P('& &&#TNPPp0D v & TNPP &&TNPP     'A x(xʦ """)))UUUMMMBBB999|PP3f3333f333ff3fffff3f3f̙f3333f3333333333f3333333f3f33ff3f3f3f3333f3333333f3̙33333f333ff3ffffff3f33f3ff3f3f3ffff3fffffffff3fffffff3f̙ffff3ff333f3ff33fff33f3ff̙3f3f3333f333ff3fffff̙̙3̙f̙̙̙3f̙3f3f3333f333ff3fffff3f3f̙3ffffffffff!___wwwݼݽݼݽ޼ݽݼݼݼݼݼݽ޼ݼݼݽ޼ݼݼݼݽñݼݼݼݼݼݼݼݼݼݼݼݼݼݼݼݽݼݽݽݼ޼ݼݽݽݼݼݼݼݼ޼ݼݼݼݼݼݼ޼ݽݼݽ޽ݽݼݽݽݽݼ޼ݼñݼݽޔtttu㓱ݽݼ޼oݼݽݽýý޽ݼݼݽݽݼݼݼݼݼ޼ݼݼݼݼ޼ݼݼݽ޼ݼݽݼݼ޼ݼݽݼݼݽݼݽݽݼݼݼݼݽݽݽݼݼݼݼݼݽý޼ݼݽݽݽ޼޼ޔoݼݼݽݽݽݼݼݽݽݼݽݽݼݽݼ޼޽ݼݼݽ½޼ݽݽ޽޼ݼݼݽݼ޼⽽ݽݼݽ޽ݽ޽ݽݽݔݼݼݽݽ޽ݽݼ޽ݽݽݽ޽ݽݼ½ݼ޼ݽ޼ݽݽݼݼݽݼݼ޼ݼݼݼݼ޼ݼݽݼݽݼݼݼݽݼݼݼݼݼ޼ݼ㔼ݽݼݼ޼ݼݼݽݽݼ޼ݼݼݽݽ޼ݼݽ޼ݼ޼޼޼ݼݼݼݽ޽޽ݼݼݼݼݼ㓔ݼ޼ݼݼݼݽݽݽݼݼݽݼݼݼݼݼ޽ݼݼޔݽݽݽݽݼݼݼݼݽݼ޽޽޽޽½޽޽޽޽޽޽ý񽼽ý޽޽޽޽޽ý޽޽޽޽޽޽޽޽޽޽޽⽽޽޽޽޼޽޽޽ý޼޼޽ý޽ýý޶޽޽޽޽޽޼޽ýýt㔶޽޽ݽ޽޽t޽u޽ý޽޽޽޽޽޽㱓޽񽽽޽޽޽޽޽޽޽޽޽ýݽ޽޽޽޽⼼޽ý޽޽޽ýnmJJ޽޽m##D##DsݼýÒD)D###$##JD#$#$###"#Dn޽D$#*#*#$##"nJ"D޽޽ýn)$#$#$#*$$Ds޽#$#*#*$)D#)$#޽s#$$#D##CDCE)$JQ0s޽񽽽޽ݽ#$D7)ý񽽽ý)#f7_D޽޽#DrDJtKn޽ݽ޽CsmLuMMtý"#JJLRR޽޽nDnELMMSMDg##m޽޽ֻ#"`Csޘ޽֧ȧ޽޶޽޽㓽޽޽o÷ "--&TNPP &՜.+,D՜.+,     COn-screen ShowUniversity of AkronU   Times New Roman Arial BlackTahomaMonotype SortsArial Javaxx.potCup 4: Java ClassesDefining a Class Objects Data MembersMethods ConstructorAccess Modifiers InheritanceInterfaces - DefiningInterfaces - Implementing  Fonts UsedDesign Template Slide Titles $em  5    _PID_GUID TemplateType GraphicType Compression ScreenSize ScreenUsage MailAddress HomePage Other DownloadOriginal DownloadIEButton UseBrowserColor BackColor TextColor LinkColor VisitedColorTransparentButton ButtonType ShowNotes NavBtnPos OutputDirAN{C7525600-497C-11D2-9E0C-00403331078B}Fmargush@uakron.edun"http://www.cs.uakron.edu/~margushvjClass Notes for ST:Java Tim Margush Department of Mathematics and Computer Science University of Akronm   f3 C:\WINDOWS\DESKTOP\JavaRoot EntrydO)@f]@Picturesg?Current User+SummaryInformation(PR#_}_ Tim MargushRoot EntrydO)E}Picturesg?Current UserMSummaryInformation(PR'_}_University UserUniversity User !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy{|}~Root EntrydO)Picturesg?Current UserSummaryInformation(PRPowerPoint Document( _DocumentSummaryInformation8z