Analyze the 1st four functional requirements above fr 1-4


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.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Analyze the 1st four functional requirements above fr 1-4
Reference No:- TGS02670646

Expected delivery within 24 Hours