class. 3. As you progress with the implementation of the methods listed above, you need to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
class. 3. As you progress with the implementation of the methods listed above, you need to test each of them. For this purpose, use the Account class that you have completed in Task 3.2. Import the class to your current project. You need to slightly extend it by adding one more property required to get the current account balance; that is, add the following: decimal Balance Property. Gets the balance of its account. 4. Test the Mystack<T> class and ensure that you cover all potential logical issues and runtime errors. This (testing) part of the task is as important as writing code for this data structure. Specifically, use your Tester class to create and populate a stack of accounts (no input from the user is required; make your example hard coded). Then, you may check against multiple test cases, for example: Check whether you can find an account with a specific balance. Test the Find method for both variants: one where such account does exist in the stack, and the other where there is no appropriate account. You should examine different configurations of the search criteria: Search for the first account with a strictly positive balance; or with a strictly positive balance that does not exceed $100. □ Check whether you can, using the FindAll method, find all accounts with a specific balance and name. Also, does this method properly find all accounts that are, for example, related to credit cards and short term deposits (use the Name property to determine the account type)? Similarly to the test of the FindAll method, check whether the RemoveAll method meets the given description and works correctly in regard to the input criteria. Make sure you test how these three methods work when the respective input criteria is null; that is, do they throw the expected exception? 5. To test the Min and the Max methods, you first must make objects of the Account class comparable. Specifically, you need to implement a mechanism that compares two elements of the Account type, and thus provides a default way to determine the relation between these elements. Fortunately, .NET Framework has a standard way to realize this approach: The Account class must implement the special IComparable<T> interface. The IComparable<T> interface imposes implementation of the compulsory CompareTo(T other) method that compares this (current) element to the other element (given as the input argument) and returns an integer value that is less than zero, when this instance (object) is considered smaller than the other object specified in the input of the Compare to method; □zero, when this instance (object) is considered equal to the other; and Ogreater than zero, when this instance (object) is considered greater than the other object. To get details on how to apply the IComparable<T> interface, you will need to do some extra research. It is important to note that in regard to the Account class, the generic type T is a placeholder that is to as an actual class. Specifically, you will need to modify the Account class be replaced by the Accoun and implement the IComparable<Account> interface along with its underlying CompareTo(Account other) method. Then, the CompareTo(Account other) must return class. 3. As you progress with the implementation of the methods listed above, you need to test each of them. For this purpose, use the Account class that you have completed in Task 3.2. Import the class to your current project. You need to slightly extend it by adding one more property required to get the current account balance; that is, add the following: decimal Balance Property. Gets the balance of its account. 4. Test the Mystack<T> class and ensure that you cover all potential logical issues and runtime errors. This (testing) part of the task is as important as writing code for this data structure. Specifically, use your Tester class to create and populate a stack of accounts (no input from the user is required; make your example hard coded). Then, you may check against multiple test cases, for example: Check whether you can find an account with a specific balance. Test the Find method for both variants: one where such account does exist in the stack, and the other where there is no appropriate account. You should examine different configurations of the search criteria: Search for the first account with a strictly positive balance; or with a strictly positive balance that does not exceed $100. □ Check whether you can, using the FindAll method, find all accounts with a specific balance and name. Also, does this method properly find all accounts that are, for example, related to credit cards and short term deposits (use the Name property to determine the account type)? Similarly to the test of the FindAll method, check whether the RemoveAll method meets the given description and works correctly in regard to the input criteria. Make sure you test how these three methods work when the respective input criteria is null; that is, do they throw the expected exception? 5. To test the Min and the Max methods, you first must make objects of the Account class comparable. Specifically, you need to implement a mechanism that compares two elements of the Account type, and thus provides a default way to determine the relation between these elements. Fortunately, .NET Framework has a standard way to realize this approach: The Account class must implement the special IComparable<T> interface. The IComparable<T> interface imposes implementation of the compulsory CompareTo(T other) method that compares this (current) element to the other element (given as the input argument) and returns an integer value that is less than zero, when this instance (object) is considered smaller than the other object specified in the input of the Compare to method; □zero, when this instance (object) is considered equal to the other; and Ogreater than zero, when this instance (object) is considered greater than the other object. To get details on how to apply the IComparable<T> interface, you will need to do some extra research. It is important to note that in regard to the Account class, the generic type T is a placeholder that is to as an actual class. Specifically, you will need to modify the Account class be replaced by the Accoun and implement the IComparable<Account> interface along with its underlying CompareTo(Account other) method. Then, the CompareTo(Account other) must return
Expert Answer:
Answer rating: 100% (QA)
Heres a stepbystep guide to help you with the implementation and testing Task 32 Account Class Modification Modify the Account class to include the Ba... View the full answer
Related Book For
Auditing A Practical Approach
ISBN: 9780730382645
4th Edition
Authors: Robyn Moroney, Fiona Campbell, Jane Hamilton
Posted Date:
Students also viewed these programming questions
-
Shares of Old Dominion are trading at $73 per share. A call option with strike price of $90 is currently selling for $7. What is the time value of the call option?
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Case Study: Quick Fix Dental Practice Technology requirements Application must be built using Visual Studio 2019 or Visual Studio 2017, professional or enterprise. The community edition is not...
-
After dating for over a year, Jack asked Jill to move in with him and gave her a key to his apartment. Shortly after Jill moved in, Jack and Jill got into an argument, and Jill moved out. Jack,...
-
The chair has a weight W and center of gravity at G. It is propped against the door as shown. If the coefficient of static friction at A is A, determine the smallest force P that must be applied to...
-
An attractive apartment project is being offered for $8,000,000. The seller represents that the annual Net Operating Income (NOI) is $450,000 and after your due diligence you concur that is an...
-
Determine the number of ways in which a software professional can choose 4 of 25 laptops to test a newly designed application.
-
1. Based on the information in this case, provide examples, for Siemens, of at least four strategically required organizational outcomes, and four required workforce competencies and behaviors. 2....
-
2) At the post office, Tiffany paid $11.04 for 24 stamps. At this rate, how much would it cost for Tiffany to buy 18 stamps? 3) At a factory, there are 40 new cars produced every 8 hours. How many...
-
The Fashion Rack has a monthly accounting period. The firms chart of accounts is shown below and on the next page. The journals used to record transactions are the sales journal, purchases journal,...
-
In an article in Harvard Business Review, Bruce Greenwald and Judd Kahn argue: Companies can vary enormously in their operating efficiencies, and these differences can be sustained for many years....
-
True or False: When dealing with multiple alternatives having unequal lives, the planning horizon equals the least common multiple of lives.
-
True or False: The MARR should be at least as great as the firm's weighted cost of capital and should reflect the opportunity cost for money.
-
True or False: The cost of debt capital needs to reflect the tax deductibility of costs of debt.
-
True or False: The Eastman hurdle rate calculator can be used for any company and under any conditions that are specifically targeted by the calculator.
-
True or False: Among the various sources of capital, U.S. large cap equities have a lower cost of capital than do U.S. small cap equities.
-
Consider the following scalar and vector functions and answerthe following question: o(x, y, z) = xy + xyz. = yzi + 4xyj + yk. F = v + _=_=ln(y)] + yk. (a) Find the gradient of the scalar field, o...
-
Selected condensed data taken from a recent statement of financial position of Morino Ltd. are as follows. MORINO LTD. Statement of Financial Position (partial) Other current assets...
-
After conducting the assessment of the design of the internal controls at Crest Outfitters, the team are meeting to discuss their next steps. Tia addresses the team. Now that weve determined that...
-
Explain the difference between the two types of subsequent events. Discuss the auditor's responsibility for detecting subsequent events (a) prior to the completion of field work, (b) prior to signing...
-
Pringle and Partners Chartered Accounting firm has built up its audit work over the last five years. It has obtained new clients each year and many of its existing clients have grown in size. It has...
-
Mark and Sofia walk together down a long, straight road. They walk without stopping for 4 miles. At this point Sofia says their displacement during the trip must have been 4 miles; Mark says their...
-
Hicham El Guerrouj of Morocco holds the world record in the 1500 m running race. He ran the final 400 m in a time of 51.9 s. What was his average speed in mph over the last 400 m? A. 14.2 mph B. 15.5...
-
Luis is visiting a public garden that has a large, circular path. When he has walked one-quarter of the distance around the path, the magnitude of his displacement is 180 m. What is the diameter of...
Study smarter with the SolutionInn App