Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solution Template Fill in the information for each test that you develop for the 4 tables below. Add more rows as required to list all

image text in transcribed

image text in transcribed

Solution Template

Fill in the information for each test that you develop for the 4 tables below. Add more rows as required to list all possible tests for each type. Do not repeat tests which have already been used to test a particular description. Use as many rows as needed to capture all of your tests. Each of the four tables may span more than one page if necessary.

Representative Input Tests

Test #

Test Description

Test Data

Expected Result

Actual Result

Pass/Fail

1

Add a party

pizza Party

Saturday 12 pm

10 adults

10 teens

10 children

Cheese: 12 * 1, 14 * 2

Pepp: 12 * 1, 14 * 2

Saus: 12 * 1

Veggie: 14 * 2

Cheese: 12 * 1, 14 * 2

Pepp: 12 * 1, 14 * 2

Saus: 12 * 1

Veggie: 14 * 2

pass

Party.cpp

#include "party.h" #include #include #include int calcSlices(party& Party); ///prints party info void party::print(std::ostream& out){ std::string titles[10]={"Cheese","Pepperoni","Sausage","Veggie","Mushroom","10\"","12\"","14\"","16\"","18\""}; std::string days[7]={"Sun","Mon","Tues","Wed","Thur","Fri","Sat"}; out 

Party.h

#ifndef __PARTY_H_INCLUDED__ #define __PARTY_H_INCLUDED__ #include /// 3 slices per adult/ if its sunday thru thursday and 5pm or later, then adults probably won't stay long, so you only need enough for 2/3 the adults /// 4 slices per teen /// 2 slices per child /// 10" pizzas have 6 slices /// 12" pizzas have 8 slices /// 14" pizzas have 10 slices (most popular) /// 16" pizzas have 12 slices /// 18" pizzas have 14 slices /// 1/3 cheese /// 62% 0f 2/3 remaining slices are meat (75% of which is pepperoni, 25% sausage) /// 48% Of 2/3 reamining are veggie (11% of which is mushroom) /// if percentage values of number of slices are less than 1 large pizza, split into smaller pizzas /// once percentages are calculated, if the percentage is less than a slice, No pizzas of that type need to be ordered. /// if remaining slices are less than 5, no more pizzas need to be ordered of that type. /// 16" and 18" are reserved for parties over 50 class party{ std::string name; int adults; int teens; int children; int dayoftheWeek; int timeOfDay; int** deets; public: party(){ name = ""; adults=0; teens=0; children=0; dayoftheWeek=0; timeOfDay=0; deets = new int*[5]; for(int i=0; iname = Name; } std::string getName(){ return name; } void setAdults(int adults){ this->adults=adults; } int getAdults(){ return adults; } void setTeens(int teens){ this->teens=teens; } int getTeens(){ return teens; } void setChildren(int children){ this->children=children; } int getChildren(){ return children; } void setCheese(int num, int pieIndex){ deets[0][pieIndex]+=num; } int getCheese(int pieIndex){ return deets[0][pieIndex]; } void setPepperoni(int num, int pieIndex){ deets[1][pieIndex]+=num; } int getPepperoni(int pieIndex){ return deets[1][pieIndex]; } void setSausage(int num, int pieIndex){ deets[2][pieIndex]+=num; } int getSausage(int pieIndex){ return deets[2][pieIndex]; } void setVeggie(int num, int pieIndex){ deets[3][pieIndex]+=num; } int getVeggie(int pieIndex){ return deets[3][pieIndex]; } void setMushroom(int num, int pieIndex){ deets[4][pieIndex]+=num; } int getMushroom(int pieIndex){ return deets[4][pieIndex]; } void setDayOftheWeek(int day){ dayoftheWeek=day; } int getDayOftheWeek(){ return dayoftheWeek; } void setTimeOfDay(int time){ timeOfDay=time; } int getTimeOfDay(){ return timeOfDay; } int getTotalAttend(){ return adults+teens+children; } }; ///does all of the calculations and function calls to accomplish it void calcPizzas(party& Party); #endif // __PARTY_H_INCLUDED__

pizzaParty.cpp

#include #include #include "party.h" using namespace std; bool menu(); void newParty(); void oldParty(); void addPartyToFile(party& Party); void printOldParties(party Party[], int numParty); int selectOldParty(party Party[], int numParty); inline bool fileExists (const string& name); int convert24(int hour, string period); int main() { bool flag=true; ///calls the menu in a loop until it returns false while(flag) { flag = menu(); if(flag){ coutnumParties; File.ignore(); party Parties[numParties]; for(int i=0; i>selection; if(!cin || !(selection>0 && selectionnumParties; inFile.ignore(); party Parties[numParties]; for(int i=0; i>con; cin.ignore(256,' '); cin.clear(); if(con == 'y' || con == 'Y'){ continue; } break; } } ///create a new party plan void newParty(){ party Party; int temp=0; string tamp=""; while(true){ cout>temp; if(!cin || temp = 0 ::: "; continue; } Party.setAdults(temp); cin.clear(); cin.ignore(256, ' '); break; } while(true){ cout>temp; if(!cin || temp = 0 ::: "; continue; } Party.setTeens(temp); cin.clear(); cin.ignore(256, ' '); break; } while(true){ cout>temp; if(!cin || temp = 0 ::: "; continue; } Party.setChildren(temp); cin.clear(); cin.ignore(256, ' '); break; } while(true){ cout>temp; if(!cin || !(temp  0)){ cin.clear(); cin.ignore(256, ' '); cout>temp; cin>>tamp; if(!cin || !(tamp=="pm" || tamp=="am") || !(temp0)){ cin.clear(); cin.ignore(256, ' '); coutselect; if(!cin || select > 3 || select  
Obisctivesi The main objective of his assgnment is to assessthe student's ability to provide a complete Black-Box testing plan for a computer program. Description: In this assignment, you will need to design a complete Black-Box testing plan for the following program. A party planner needs a quick way of calculating certain distributions of food to order. In this instance, types, sizes, and number of pizzas to order for pizza parties. In their experience, the best distribution of type, and number of slices per person in order to make the most people happy at a party follows a number of rules: Adults generally eat around 3 slices each Teens cat an average of 4 slices each. Children typically eat 2 slices each. If it's a school night (Sunday-Thursday) and the party is at 5pm or later, Adults tend to eat less and leave early. The number of adults you need to buy pizza for can be reduced by a third. o 33% (13) of the total slices should be Cheese Of the remaining 67%, 62% of the slices should be Meat. . . 75% of the meat slices should be Pepperoni 25% Sausage o o Of the remaining 67%, 38% should be Veggie. o 1 1% of the veggie slices should include Mushroom. *If the percentage value of slices for a type is less than 3 slices, no pizzas of that type will be ordered. For each category of pizza (cheese, pepperoni, sausage, veggie and mushroom), determine the number and size of pizzas by starting with the largest size possible that is less than or equal to the total slices for that category. Obisctivesi The main objective of his assgnment is to assessthe student's ability to provide a complete Black-Box testing plan for a computer program. Description: In this assignment, you will need to design a complete Black-Box testing plan for the following program. A party planner needs a quick way of calculating certain distributions of food to order. In this instance, types, sizes, and number of pizzas to order for pizza parties. In their experience, the best distribution of type, and number of slices per person in order to make the most people happy at a party follows a number of rules: Adults generally eat around 3 slices each Teens cat an average of 4 slices each. Children typically eat 2 slices each. If it's a school night (Sunday-Thursday) and the party is at 5pm or later, Adults tend to eat less and leave early. The number of adults you need to buy pizza for can be reduced by a third. o 33% (13) of the total slices should be Cheese Of the remaining 67%, 62% of the slices should be Meat. . . 75% of the meat slices should be Pepperoni 25% Sausage o o Of the remaining 67%, 38% should be Veggie. o 1 1% of the veggie slices should include Mushroom. *If the percentage value of slices for a type is less than 3 slices, no pizzas of that type will be ordered. For each category of pizza (cheese, pepperoni, sausage, veggie and mushroom), determine the number and size of pizzas by starting with the largest size possible that is less than or equal to the total slices for that category

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part 3 Lnai 8726

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448440, 978-3662448441

More Books

Students also viewed these Databases questions

Question

What kind of process produces manganese nodules?

Answered: 1 week ago