Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Assignment: Software testing and TDD

The big picture: We're developing an inventory and purchasing system for a regional franchise, our client. The complete software system will include an inventory management system and will control the point-of-sale checkout registers. Our team is responsible for the point-of-sale software, not the inventory system. Because of the financial, tax, and legal liability of the client, the software accuracy must be ensured and verified.

User Story: Compute the net price of all the items in a customer's shopping cart including all applicable discounts and taxes.

After discussing further with the client, we have defined the following functional requirements.

FR 1) If the shopping cart contains 10 or more items, the customers shall get a 10% discount off of the purchase price before taxes are included. Otherwise, if the shopping cart contains more than 5 items, the customer shall receive a 5% discount before tax. The customer receives no discount if less than 5 items.

FR 2) If the customer is a member of the store's discount shopping club, they shall receive an additional 10% discount off of the purchase price before taxes.

FR 3) Customers shall not purchase more than 50 items in a single checkout session.

FR 4) Unless a customer has tax-exempt status, the local sales tax rate of 4.5% shall be applied to the net discounted price.

FR 5) Dollar amounts shall be rounded to the nearest cent ($0.01) before and after the tax rate is applied.

FR 6) The net purchase before any discount, the net discount, the tax amount, and the net total due shall all be reported in dollars.

Task 1:

Analyze the 1st four functional requirements above (FR 1-4) and determine the number of test cases needed to provide 100% path coverage. Use graph theory (i.e., control flow analysis) and / or truth tables to analyze the required logic. Furthermore, design additional tests using equivalence partitions and boundary value analysis (BVA) to provide further verification.

Submit your analysis of the theoretical number of test cases to Sakai. Describe how your deduced the number of test cases and provide documentation (e.g., flow graphs, pseudo-code, truth tables).

Task 2:

Implement the above user story using an object-oriented (OO) language of your choosing. Implement the functionality incrementally using the test-drive development (TDD) principle. Create automated tests cases that provide statement, branch, conditional, and loop coverage as necessary. Create additional test cases using equivalence partitioning (EP) and boundary value analysis (BVA) techniques as needed. Note, that you have already designed the tests in task 1 but verify that you still have sufficient coverage.

Keep a developer's log documenting the increments coded, the associated test(s), what bugs were found by which test case, and why. Describe the intent and motivation for each test. Create mock objects as needed to complete the implementation and testing. Publish code on BitBucket with sufficient commit history to track the evolution of the TDD process.

Development details:

The larger inventory database system is not complete but the software design of the database defines a

DataBase class that has a getItem member function:
Item DataBase::getItem (String ItemID)
that returns a pointer to an object of type Item if found; otherwise, it returns NULL. The Item class has a getPrice member function:
float Item::getPrice()
that returns the purchase price of a single item. Implement the method
ShoppingCast::calcPurchasePrice (String[] ProductIDs, Customer customer)
which is a member of the ShoppingCart class. ProductIDs is a list (i.e., array) of strings (in your favorite OO language) that represent the item ID's of the products in the customer's shopping cart (assume they were scanned already) and Customer is a class with methods indicating if the customer is a member of the store's Discount Shoppers Club and if they are tax-exempt. I leave it to you (and your partner if you choose) to design of the Customer class and the list of strings parameters passed to the calcPurchasePrice method.

You will need to create a mock database object of type DataBase to supply information to the ShoppingCart class method(s). The mock object can be instantiated and passed to the constructor of your ShoppingCart to avoid inheritance issues when the real data type is included.

Commit your OO source code and automated test cases to BitBucket and developer's log to Sakai. The submitted code must be professional quality. Include sufficient interface documentation to allow an outside developer or tester to create and execute black-box test cases based upon the specified user requirements. Include instructions for building your source and linking with a driver application. Your code should separate the class signatures from the implementations as much as possible within the confines of your chosen programming language. For example, separate class headers (.h, .hpp) and implementation files (.cpp) in C++.

Advice: It is good practice to avoid publishing source or build methods that are dependent upon a specific IDE. Ideally, your code should be structured so that it can be built without an IDE; however, this is not a requirement for this assignment. Why is this an issue? When publishing (or delivering) executable software systems, the build environment is not particularly relevant. However, when publishing source code, the intent is that other developers can build your suite. Tight dependency upon a specific IDE can be a burden and anything that is burdensome reduces uptake.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92703502

Have any Question?


Related Questions in Computer Engineering

Discuss how the scope of computer security grew from

Discuss how the scope of computer security grew from physical security to include : Securing the data Limiting random and unauthorized access to that data. Involvement of personnel from multiple levels of the organizatio ...

Suppose after collecting data on an existing firms actual

Suppose, after collecting data on an existing firm's actual short-run ouput, the following production function is found to match the data:  TP = Q = 5*L + 0.6*L2 - 0.01*L3  1. Using the equation above, find the following ...

Question the chief technology officer cto has indicated

Question: The Chief Technology Officer (CTO) has indicated that your organization has been requested by the National Security Council (NSC) to comment on the upcoming National Cybersecurity Strategy. The NSC has asked fo ...

Question suppose that we want to create a divide and

Question : Suppose that we want to create a divide and conquer matrix multiplication algorithm for square matrices. Assuming that n is a power of three, the algorithm divides each matrix of A, D, and C into nine equi-siz ...

A chemistry student needsnbsp700 g of ethanolamine for an

A chemistry student needs 70.0 g of ethanolamine for an experiment. By consulting the  CRC Handbook of Chemistry and Physics , the student discovers that the density of ethanolamine is 1.02 g.cm^-3. Calculate the volume ...

Discuss the criteria necessary to establish a factor as a

Discuss the criteria necessary to establish a factor as a confounder and provide an example applying these criteria?

When a source operand is ambiguous such as a value defined

When a source operand is ambiguous, such as a value defined as CR EQU 0DH, which can be either a 16 bit value or an 8 bit value, how can the ambiguity be removed. This is typical of an error staring "Is it byte or word?" ...

Excel discussionconsider this using the mouse to point and

Excel discussion Consider this.... Using the mouse to point and click is one way to work on a computer. Often, the same work can be accomplished using just the keyboard, using shortcut keyboard combinations. For example, ...

Assignmentnbspon information systems audit and

Assignment  on Information Systems audit and controls Assignment purpose: Elaborate on the different types of control that are applied in a hospital (Preventive, detective and corrective control). Evaluate the logical an ...

Explain a situation using the supply and demand for skilled

Explain a situation using the supply and demand for skilled labor in which the increased number of college graduates leads to depressed wages. Given the rising cost of going to college, explain why a college education wi ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As