ShmoopTube
Where Monty Python meets your 10th grade teacher.
Search Thousands of Shmoop Videos
AP Computer Science Videos 113 videos
AP Computer Science 1.2 GridWorld Case Study and APIs. What is the direction of the actor?
AP Computer Science 1.4 Standard Algorithms. How many times will mystery be called for mystery(n) for n > 1?
AP Computer Science 2.3 Classes and Objects. Which of the following is correct implementation of the Country class?
AP Computer Science 3.5 Program Development 199 Views
Share It!
Description:
AP Computer Science 3.5 Program Development. What is the smallest set of orders that adequately tests our program?
Transcript
- 00:00
Thank you We speak and here's your shmoop usually brought
- 00:05
to you by pickles that air jealous of cucumbers They're
- 00:09
a little sour We're starting a new business that ship's
- 00:13
dill pickles We relished our experience in the field of
- 00:16
education but it isn't really our jam anymore Given the
Full Transcript
- 00:20
state of the economy We're in a bit of well
- 00:22
pickle and we want to generate more revenue We've written
- 00:25
a program that sorts and ship pickles in the following
- 00:27
quantities and prices based on order size program takes the
- 00:31
order sizes and imager input parameter and outputs The total
- 00:34
cost of the order Four dollars on nine cents Reach
- 00:37
pickle upto Five pickles Two bucks for each additional pickle
- 00:41
beyond five but not exceeding twelve and a dollar for
- 00:44
each additional pickle after twelve What's the smallest set of
- 00:48
orders that adequately tests our program Here's the thing here
- 00:53
is like rain Yeah think about this All right So
- 00:58
for this problem we want a set of numbers that
- 01:00
test each possible case for each range We want to
- 01:03
test the lower limit A number in the middle and
- 01:05
the upper limit For example the first range Where there
- 01:09
Should be no differential in the cost of pickles is
- 01:11
from zero to five pickles Thus we wanna test zero
- 01:14
pickles a number in between three pickles and five pickles
- 01:19
This'll adequately test the first price range for the next
- 01:22
price range We test the lower and upper limits a
- 01:25
five and twelve and a middle number seven Lastly we
- 01:28
want to test the upper price range the lower limit
- 01:30
being twelve in this case and unique as all we
- 01:33
need to do adequately tested is input a number greater
- 01:36
than twelve Well all pickles after twelve should be the
- 01:40
same cost so we can pick any number above twelve
- 01:43
to test our last case But we have test cases
- 01:47
with zero three five seven twelve fifteen pickles and that
- 01:51
makes our answer choice D Next time we'll cover the 00:01:53.848 --> [endTime] process of making pickles not a big deal
Related Videos
AP Computer Science 1.2 GridWorld Case Study and APIs. What is the direction of the actor?
AP Computer Science 1.4 Standard Algorithms. How many times will mystery be called for mystery(n) for n > 1?
AP Computer Science 2.3 Classes and Objects. Which of the following is correct implementation of the Country class?
AP Computer Science 3.4 Inheritance, Abstraction, and Polymorphism. Which of the following will satisfy the conditional if statement for boo, str,...
AP Computer Science 4.2 Standard Algorithms. What kind of algorithm is the following?