Create a simple Juice class, which has name and capacity properties. The class should also permit the adding of two sepa
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Create a simple Juice class, which has name and capacity properties. The class should also permit the adding of two sepa
Create a simple Juice class, which has name and capacity properties. The class should also permit the adding of two separate instances of the Juice object resulting in a new instance with the combined capacity and names of the juices being added. For example, if you add an Orange juice with 1.0 capacity and an Apple juice with 2.5 capacity, the resulting juice should have: name: “Orange & Apple" capacity: 3.5
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!