Abstract
By the end of this chapter students should be able to:
-
design classes using the notation of the Unified Modeling Language (UML);
-
write the Java code for a specified class;
-
explain the difference between public and private access to attributes and methods;
-
explain the meaning of the term encapsulation ;
-
explain the use of the static keyword;
-
pass objects as parameters;
-
develop their own collection classes in Java;
-
identify the advantages of object-oriented programming.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Martina Seidl et al., UML @Classroom, An Introduction to Object Oriented Modeling, Springer 2015.
- 2.
Here the word user is referring to the person writing the program, not the person using it!
- 3.
You would be right in thinking that the balance attribute would automatically be assigned a value of zero if we did not specifically do that here. However it is good practice always to ensure that variables are initialized with the values that we require—particularly because in many other programming languages attributes are not initialized as they are in Java.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Charatan, Q., Kans, A. (2019). Implementing Classes. In: Java in Two Semesters. Texts in Computer Science. Springer, Cham. https://doi.org/10.1007/978-3-319-99420-8_8
Download citation
DOI: https://doi.org/10.1007/978-3-319-99420-8_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-99419-2
Online ISBN: 978-3-319-99420-8
eBook Packages: Computer ScienceComputer Science (R0)