Question

2. Consider a software module that is intended to accept the name of a grocery item and a list of the different sizes the ite

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution

(a)

a. For the above given scenario, list the valid and invalid partitions/equivalence classes.

quivalence Classes:

1:- Item-name is alphabetic [VALID]

2:- Item-name is not alphabetic [INVALID]

3:- Item-name is less than 2 characters in length [INVALID]

4:- Item-name is 2 to 15 characters in length [VALID]

5:- Item-name is greater than 15 characters in length [INVALID]

6:- Size-value is less than 1 [INVALID]

7:- Size-value is in the range 1 to 48 [VALID]

8:- Size-value is greater than 48 [INVALID]

9:- Size-value is a whole number [VALID]

10:- Size-value is a decimal [INVALID]

11:- Size-value is numeric [VALID]

12:- Size=value includes nonnumeric characters [INVALID]

13:- Size-values entered in ascending order [VALID]­­

14:- Size-values entered in nonascending order [INVALID]

15:- No size-values entered [INVALID]

16:- 1 to 5 size-values entered [VALID]

17:- More than 5 sizes entered [INVALID]

18:- Item-name is first [VALID]

19:- Item-name is not first [INVALID]

20:- A single comma separates each entry in list [VALID]

21:- A comma does not separate 2 or more entries in the list [INVALID]

22:- The entry contains no blanks [VALID]

23:- The entry contains blanks [VALID]

---

b. Derive weak normal and strong normal test cases

Test Data

Expected Outcome

Classes Covered

1

xy,1

T

1,4,7,9,11,13,16,18,20,22

2

AbcDefghijklmno,1,2,3 ,4,48

T

1,4,7,9,11,13,16,18,20,23

3

a2x,1

F

2

4

A,1

F

3

5

abcdefghijklmnop

F

5

6

Xy,0

F

6

7

XY,49

F

8

8

Xy,2.5

F

10

9

xy,2,1,3,4,5

F

14

10

Xy

F

15

11

XY,1,2,3,4,5,6

F

17

12

1,Xy,2,3,4,5

F

19

13

XY2,3,4,5,6

F

21

14

AB,2#7

F

12

---

ALL THE BEST

Add a comment
Know the answer?
Add Answer to:
2. Consider a software module that is intended to accept the name of a grocery item...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Need this in C The starter code is long, if you know how to do it...

    Need this in C The starter code is long, if you know how to do it in other way please do. Do the best you can please. Here's the starter code: // ----------------------------------------------------------------------- // monsterdb.c // ----------------------------------------------------------------------- #include #include #include // ----------------------------------------------------------------------- // Some defines #define NAME_MAX 64 #define BUFFER_MAX 256 // ----------------------------------------------------------------------- // Structs typedef struct { char name[NAME_MAX]; int hp; int attackPower; int armor; } Character; typedef struct { int size; Character *list; } CharacterContainer; // ----------------------------------------------------------------------- //...

  • Java Software Originals, Inc., has been hired by Eaton Wright, the "pizza king", to help automate...

    Java Software Originals, Inc., has been hired by Eaton Wright, the "pizza king", to help automate a new chain of pizza delivery stores. SOI's system engineering staff have asked you to implement a prototype for the telephone operator's console. To start the project they have assigned you to implement the following two static methods (the first of which will be used to read files containing menus of pizza sizes and their prices, and pizza toppings and their prices; and the...

  • Q1. Write a program to simulate a grocery waiting queue. Your program should ask the user...

    Q1. Write a program to simulate a grocery waiting queue. Your program should ask the user if they want to add a customer to the queue, serve the next customer in the queue, or exit. When a customer is served or added to the queue, the program should print out the name of that customer and the remaining customers in the queue. The store has two queues: one is for normal customers, another is for VIP customers. Normal customers can...

  • Edit a C program based on the surface code(which is after the question's instruction.) that will...

    Edit a C program based on the surface code(which is after the question's instruction.) that will implement a customer waiting list that might be used by a restaurant. Use the base code to finish the project. When people want to be seated in the restaurant, they give their name and group size to the host/hostess and then wait until those in front of them have been seated. The program must use a linked list to implement the queue-like data structure....

  • DESCRIPTION You have to design an e-commerce shopping cart. These require classes Item, Electronics, Food, Dress,...

    DESCRIPTION You have to design an e-commerce shopping cart. These require classes Item, Electronics, Food, Dress, Cart and Main. ITEM CLASS Your Item class should contain: Attributes (protected) String name - name of the Item double price - price of the item Methods (public) void setName(String n) - sets the name of Item void setPrice(double p) - sets the price of Item String getName() - retrieves name double getPrice() - retrieves price String formattedOutput() returns a string containing detail of...

  • please use dia to draw the e-r diagram to create Entity - Relationship Diagrams then use MS access This project requires you to create a database design. Your design will be documented in a set o...

    please use dia to draw the e-r diagram to create Entity - Relationship Diagrams then use MS access This project requires you to create a database design. Your design will be documented in a set of Entity-Relationship Crow's Foot diagrams using the representation as shown in the lecture materials. Draw a set of Entity-Relationship diagrams to model the following scenario. The Maggs Realty Company wants to track the Sales Offices that they have across all of Ontario They are interested...

  • 8.7 LAB*: Program: Online shopping cart (Part 2)

    8.7 LAB*: Program: Online shopping cart (Part 2)Note: Creating multiple Scanner objects for the same input stream yields unexpected behavior. Thus, good practice is to use a single Scanner object for reading input from System.in. That Scanner object can be passed as an argument to any methods that read input.This program extends the earlier "Online shopping cart" program. (Consider first saving your earlier program).(1) Extend the ItemToPurchase class per the following specifications:Private fieldsstring itemDescription - Initialized in default constructor to "none"Parameterized...

  • Lab 2: (one task for Program 5): Declare an array of C-strings to hold course names,...

    Lab 2: (one task for Program 5): Declare an array of C-strings to hold course names, and read in course names from an input file. Then do the output to show each course name that was read in. See Chapter 8 section on "C-Strings", and the section "Arrays of Strings and C-strings", which gives an example related to this lab. Declare the array for course names as a 2-D char array: char courseNames[10] [ 50]; -each row will be a...

  • 7.11 LAB: Online shopping cart - Part 2 This program extends the earlier "Online shopping cart" program. (Consid...

    7.11 LAB: Online shopping cart - Part 2 This program extends the earlier "Online shopping cart" program. (Consider first saving your earlier program). (1) Extend the ItemToPurchase namedtuple to contain a new attribute. (2 pts) item_description (string) - Set to "none" in the construct_item() function Implement the following function with an ItemToPurchase as a parameter. print_item_description() - Prints item_name and item_description attribute for an ItemToPurchase namedtuple. Has an ItemToPurchase parameter. Ex. of print_item_description() output: Bottled Water: Deer Park, 12 oz....

  • Assignment Overview This programming assignment is intended to demonstrate your knowledge of the following:  Writing...

    Assignment Overview This programming assignment is intended to demonstrate your knowledge of the following:  Writing a while loop  Writing a for loop  Writing a while loop with a sentinel value Chocolate Coupons Foothill Fro-cho, LLC, gives customers a coupon every time they purchase a chocolate bar. After they earn a certain number of coupons, they qualify for a free chocolate bar, which they may use toward the purchase of a single chocolate bar. Usually, 7 is the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT