Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 4 Create a class KFC where each object represents a branch of the shop. Class should keep track of _branchname # name of branch
Problem 4 Create a class KFC where each object represents a branch of the shop. Class should keep track of _branchname # name of branch _branchsales # amount of sales by that branch object _soldmeals # number of meals sold by branch object __totalsales #total sales by KFC class _employees #names of all employees working in a branch Add following behaviors to the class. Constructor initialize all the data of a branch if given Sale Number of meals and price per meal should be passed getBranch Sales Should return total amount of sold meals by branch .getTotalSales Should retum total amount of sold meals for all KFC objects .getEmployees Should print all the employees working in a branch Create multiple instances of KFC class into a list and write a driver function to call all the function of a class
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started