The program evaluates the sales price of a paper bag and a plastic bag. Both bag classes are created concretely from the abstract Bag class. The sales price method of the Bag class is an abstract method, which is implemented concretely in the subclasses that inherit this class.
You'll learn most by trying my code while watching the video.
Please post your improvement on my code on the comments.
Concepts:
Abstract class and method
Inheritance
"protected" keyword
Playlist of my Java course
https://www.youtube.com/playlist?list=PLtQo0sxRN7JLr647f8RTzS58u8Rv5jxT5
Playlist of my Java examples
https://www.youtube.com/playlist?list=PLtQo0sxRN7JKKla3_GAF05dySjyy3nINa