We may earn an affiliate commission when you visit our partners.
Course image
Course image
Coursera logo

Java Inheritance, Composition and Aggregation

David Dalsveen

In this project you will create a Java application that inherits from a Car class in Java and use aggregation and composition in a class that uses one to many Car objects.

Read more

In this project you will create a Java application that inherits from a Car class in Java and use aggregation and composition in a class that uses one to many Car objects.

Code re-use allows the developer to use tried and tested code, which results in more reliable code and saves in development time as well. In Object-Oriented Programming in a language such as Java, code re-use can be accomplished in two distinctive ways. One way is to inherit from an existing class by extending its existing functionality. A Car class for example can be extended by a Used Car class by adding a parameter to indicate the number of miles on it. Another common way to re-use code is through aggregation and composition. In aggregation, the class is made up of other existing classes that may exist independent of the parent class.

Note: This course works best for learners who are based in the North America region. We’re currently working on providing the same experience in other regions.

Enroll now

What's inside

Syllabus

Java Inheritance, Composition and Aggregation
A hallmark of Object-Oriented programming is code-reuse. Code re-use allows the developer to use tried and tested code, which results in more reliable code and saves in development time as well. In Object-Oriented Programming in a language such as Java, code re-use can be accomplished in two distinctive ways. One way is to inherit from an existing class by extending its existing functionality. A Car class for example can be extended by a Used Car class by adding a parameter to indicate the number of miles on it. This is known as an is-a relationship; a Used Car is-a Car. Another common way to re-use code is through aggregation and composition. In aggregation, the class is made up of other existing classes that may exist independent of the parent class. For example, A Car Dealership may contain many Cars in its inventory. If the Dealership goes under, the Car still exists. There is another relationship related to Aggregation called Composition. In composition, the child class depends on its parent for existence. A Car dealership may have several accounts with companies who operate fleets of cars. The accounts are dependent on the existence of the Dealership. When the Dealership disappears, so do its accounts. In this project you will create a Java application that inherits from a Car class in Java and use aggregation and composition in a class that uses one to many Car objects.

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Develops skills in aggregation and inheritance in Java, which are core to object-oriented programming
Teaches code re-use through aggregation and composition, which improves code reliability and efficiency
Suitable for learners who are interested in learning Java programming techniques
Requires learners to have a basic understanding of Java programming

Save this course

Save Java Inheritance, Composition and Aggregation to your list so you can find it easily later:
Save

Reviews summary

Some good, some bad

Learners are somewhat divided on the quality of this course, with some enjoying the content while others criticizing the instructor. The single positive review calls the course an "awesome" refreasher course, while the single negative review complains of poor instruction and course navigation.
The course content is well received.
"Awesome. Java has a similar feel to C++ and this was a nice refresh from a Java perspective."
Coding while the instructor explains is a struggle.
"Also keeps on expanding his view, so coding while he's going is a pain."
Instruction style is unclear or non-existant.
"Instructor does little to no explaining of the code, just do this and do that."
Opinions are split on this course.
"Awesome. Java has a similar feel to C++ and this was a nice refresh from a Java perspective."
"Instructor does little to no explaining of the code, just do this and do that."

Activities

Coming soon We're preparing activities for Java Inheritance, Composition and Aggregation. These are activities you can do either before, during, or after a course.

Career center

Learners who complete Java Inheritance, Composition and Aggregation will develop knowledge and skills that may be useful to these careers:
Software Engineer
Software Engineers use computer science principles to design, develop, deploy, and maintain software applications. They use their knowledge of programming languages and software engineering principles to create software that meets the needs of users. This course can help Software Engineers build a foundation in Java programming, which is one of the most popular programming languages used in the software industry.
Java Developer
Java Developers use the Java programming language to develop software applications. They use their knowledge of Java programming syntax and libraries to create software that meets the needs of users. This course can help Java Developers build a foundation in Java programming, which is essential for success in this role.
Mobile Developer
Mobile Developers use programming languages such as Java, Kotlin, and Swift to develop mobile applications for smartphones and tablets. They use their knowledge of mobile development principles and technologies to create mobile applications that are user-friendly and meet the needs of users. This course can help Mobile Developers build a foundation in Java programming, which can be used to develop mobile applications.
Web Developer
Web Developers use HTML, CSS, JavaScript, and other programming languages to create websites and web applications. They use their knowledge of web development principles and technologies to create websites that are user-friendly and meet the needs of users. This course can help Web Developers build a foundation in Java programming, which can be used to develop web applications.
Data Analyst
Data Analysts use data analysis techniques to extract insights from data. They use their knowledge of data analysis tools and techniques to identify trends and patterns in data. This course can help Data Analysts build a foundation in Java programming, which can be used to develop data analysis tools and applications.
Data Scientist
Data Scientists use data science techniques to solve business problems. They use their knowledge of data science tools and techniques to build predictive models and develop data-driven solutions. This course can help Data Scientists build a foundation in Java programming, which can be used to develop data science tools and applications.
Machine Learning Engineer
Machine Learning Engineers use machine learning techniques to develop machine learning models. They use their knowledge of machine learning tools and techniques to build and deploy machine learning models. This course can help Machine Learning Engineers build a foundation in Java programming, which can be used to develop machine learning tools and applications.
Computer Programmer
Computer Programmers use programming languages to develop software applications. They use their knowledge of programming languages and software development principles to create software that meets the needs of users. This course can help Computer Programmers build a foundation in Java programming, which is one of the most popular programming languages used in the software industry.
Software Architect
Software Architects design and develop software architectures for software applications. They use their knowledge of software architecture principles and technologies to create software architectures that meet the needs of users. This course can help Software Architects build a foundation in Java programming, which is one of the most popular programming languages used in the software industry.
Database Administrator
Database Administrators design and maintain databases. They use their knowledge of database management systems and technologies to create and maintain databases that meet the needs of users. This course can help Database Administrators build a foundation in Java programming, which can be used to develop database management tools and applications.
System Analyst
System Analysts analyze and design computer systems. They use their knowledge of systems analysis and design techniques to create and maintain computer systems. This course may be useful for System Analysts who want to learn Java programming, which can be used to develop systems analysis and design tools and applications.
Business Analyst
Business Analysts use business analysis techniques to identify and solve business problems. They use their knowledge of business analysis tools and techniques to develop business solutions. This course may be useful for Business Analysts who want to learn Java programming, which can be used to develop business analysis tools and applications.
Network Administrator
Network Administrators design and maintain computer networks. They use their knowledge of networking technologies to create and maintain computer networks that meet the needs of users. This course may be useful for Network Administrators who want to learn Java programming, which can be used to develop network management tools and applications.
Quality Assurance Analyst
Quality Assurance Analysts test software applications to ensure they meet quality standards. They use their knowledge of software testing tools and techniques to test software applications. This course may be useful for Quality Assurance Analysts who want to learn Java programming, which can be used to develop software testing tools and applications.
Project Manager
Project Managers plan and execute projects. They use their knowledge of project management principles and tools to manage projects effectively. This course may be useful for Project Managers who want to learn Java programming, which can be used to develop project management tools and applications.

Reading list

We've selected 12 books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Java Inheritance, Composition and Aggregation.
Classic guide to writing effective Java code. It covers best practices for writing clean, maintainable, and efficient code.
Is the classic guide to design patterns. It covers the most common design patterns in detail and provides a wealth of examples.
Classic essay on software engineering. It covers the challenges of software development and provides insights into how to overcome them.
Guide to working effectively with legacy code, code that is old and difficult to understand.
Comprehensive guide to Java concurrency. It covers all aspects of concurrency in Java, from basic concepts to advanced topics.
Great introduction to design patterns for Java programmers. It covers the most common design patterns in a fun and engaging way.
Practical guide to writing clean and maintainable code. It covers best practices for writing code that is easy to read, understand, and modify.
Guide to domain-driven design, a software development approach that focuses on modeling the domain of the software system.
Great introduction to Java for beginners. It covers the basics of the language in a fun and engaging way.

Share

Help others find this course page by sharing it with your friends and followers:
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2024 OpenCourser