Question: For java Write a class encapsulating a Restaurant,which inherits from Store. Store has the following attributes: name and sales tax rate; A Restaurant has the
For java
Write a class encapsulating a Restaurant,which inherits from Store. Store has the following attributes: name and sales tax rate; A Restaurant has the following additional attributes: how many people are served every year and the average price per person. code the constructor, accessors, mutators, toString and equals method of the super class Store and the subclass Restaurant; also in Restaurant - code a method returning the average taxes per year. You also need to include a client class to test your code for both the parent class and the subclass.
You should test creating Store objects and Restaurant objects, your set methods and get methods, toString and equals methods.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
