You have been hired by a local grocery store in order to update and expand the CashRegister Class that was discussedin dass. Yourtaskis to update t class by adding functionality to it such that it will compute the total sales by all customer in a whole day reset all variabl es after the store closes every day, and showthe customer count per day, every day In order to accomplish your taskyou needto do two smaller tasks: 1. Update the exi sting methods presented during lecture time, as needed, to accomplish the task described, above. 2 In order to help you further, you need to wite 4 new methods, as follows: • addCustomerCount () – increments the customer count at the end of every customer sale end getCustomerCount () – gets/retums the customer count, to be invoked at the end of every day • getSalesTotal () – gets/retums the total customer sales for all customers; to be invoked at the end of every day • resetSales() –- clear daily instance variables that need to be cleared at the end of every day Important remarks: 3. You MUST USE the exact same methods names above, and to keep all the methods and theirnames that were discussedin lecture 4. Notice that the new methods do not take any input parameters 5. You may call your newinstance variables using any names that you choose 6. Your updated CashRegister dlass will betested by data of our choosing using the same method names mentioned in class and the new ones above, and therefore, it is important that you use the same method names and that they do the tasks described, above. Est the abov e dass by: • Crating one CashRegister object, add two days sales. • For First day add sales for two customers. • ustomer 1: items = 3 and Total = 5.40 • Customer 2 items = 4 and Total = 10.00
You have been hired by a local grocery store in order to update and expand the CashRegister Class that was discussedin dass. Yourtaskis to update t class by adding functionality to it such that it will compute the total sales by all customer in a whole day reset all variabl es after the store closes every day, and showthe customer count per day, every day In order to accomplish your taskyou needto do two smaller tasks: 1. Update the exi sting methods presented during lecture time, as needed, to accomplish the task described, above. 2 In order to help you further, you need to wite 4 new methods, as follows: • addCustomerCount () – increments the customer count at the end of every customer sale end getCustomerCount () – gets/retums the customer count, to be invoked at the end of every day • getSalesTotal () – gets/retums the total customer sales for all customers; to be invoked at the end of every day • resetSales() –- clear daily instance variables that need to be cleared at the end of every day Important remarks: 3. You MUST USE the exact same methods names above, and to keep all the methods and theirnames that were discussedin lecture 4. Notice that the new methods do not take any input parameters 5. You may call your newinstance variables using any names that you choose 6. Your updated CashRegister dlass will betested by data of our choosing using the same method names mentioned in class and the new ones above, and therefore, it is important that you use the same method names and that they do the tasks described, above. Est the abov e dass by: • Crating one CashRegister object, add two days sales. • For First day add sales for two customers. • ustomer 1: items = 3 and Total = 5.40 • Customer 2 items = 4 and Total = 10.00
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 2 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY