Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions

Question

Define and discuss the nature of culture

Answered: 1 week ago