When entering testcase 3 i decided to make the price

Info icon This preview shows pages 6–10. Sign up to view the full content.

View Full Document Right Arrow Icon
When entering Testcase #3, I decided to make the price a negative and then keep the sales tax in the positive. My thoughts were comparing this to a return in the store. So the expected output would also be negative. As it turns out, I was correct. Entering a negative price (-$23.49) and a positive sales tax (10.88%) would still give a negative output by adding the two prices together.
Image of page 6

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Homework 2 Test Case Creation Testcase #4
Image of page 7
Homework 2 Test Case Creation For testcase #4 I wanted to see what would happen if I entered a large number with commas and just a percent sign. My thoughts for the expected output was that I would get an error because no numerical value was entered into the sales tax, just a % sign. I was very very wrong. I was not expecting for the commas to turn the large value into a small value and for the % sign to equal 0. Lesson learned….on to Testcase #5, large numerical input without commas.
Image of page 8

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Homework 2 Test Case Creation Testcase #5
Image of page 9
Homework 2 Test Case Creation For testcase #5, I left the commas out, entered a large numerical value for the price and then entered the word “undefined” for the sales tax. What I expected on the outcome was an Error: Undefined. However, what I got in the output for the sales tax was just the word undefined. I did get the large price (due to leaving the commas out) but am not sure where the “36” came from in the end of the price when I entered it as “21”. Still a bit confused on this one.
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern