Purchase Solution

Done in vb.net, just make this basic

Not what you're looking for?

Ask Custom Question

The MiniCalc application was designed to perform basic math calculations: +, -, *, /. However, in its present form, this application needs some improvements.

1. Test all operators with the values 8 and 2 to make sure it works as expected.

2. Test the program with 99999 + 99999. This should raise a 'System.OverflowException' exception.

3. Test the program with '9 divide 0'. The result shows 'infinity'. Actually, the calculation should raise an exception 'System.DivideByZeroException'. Modify the program so that the user input is validated before the divide operation is performed. For a divide by zero, modify the program to raise an exception, then add the code to handle the exception.

4. Now test the '-' operator using the following test cases: (1) variable1 = 32000 and variable2 = -767 and (2) variable1 = 32000 and variable2 = -768. For the first test case, the result should be 32767. For the second test case, you should get an exception.
In a Word document, write 2 paragraphs explaining what is different from the first case and fix the problem to handle the exception.

Attachments
Purchase this Solution

Solution Preview

In case (4), in the first test case, the subtraction is performed OK, whereas in the second test case, a ...

Purchase this Solution


Free BrainMass Quizzes
Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Javscript Basics

Quiz on basics of javascript programming language.