Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 6 - 3 Enhance the Invoice Total application In this exercise, you'll enhance the Invoice Total application from chapter 5 s o it uses

Exercise 6-3 Enhance the Invoice Total application
In this exercise, you'll enhance the Invoice Total application from chapter 5so it uses a method with a tuple.
Add a GetInvoiceAmounts() method
Open the application that's in the C:C#|Chapter|06VInvoiceTotal directory.
Add a method named GetInvoiceAmounts() that accepts the customer type and subtotal and returns the discount percent. You can do that manually or using refactoring.
Test the application to make sure the new method works correctly.
Add a tuple
4. Modify the declaration for the GetInvoiceAmounts() method so it returns a tuple that includes the discount percent and the discount amount. Then, modify the code for this method so it works with the tuple.
5. Modify the calling code so it deconstructs the tuple that's returned by the GetInvoiceAmounts() method. When you do that, you can delete the statements that declare and calculate the discount amount and invoice total.
6. Test the application to make sure the changes work.
image text in transcribed

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

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions

Question

What are the functions of top management?

Answered: 1 week ago

Question

Bring out the limitations of planning.

Answered: 1 week ago

Question

Why should a business be socially responsible?

Answered: 1 week ago

Question

Discuss the general principles of management given by Henri Fayol

Answered: 1 week ago