Sie sind auf Seite 1von 5

Name: Anisha Bali UTD ID:2021089294 MIS 6308: Systems Analysis and Project Management Summer 2011 Assignment

2 Q1) a) Draw the program graph for the above program.

Start

G H

End

Node A B

Statements included in the node 1 (Start) 2

C D E F G H

3,4 5,6,7,8 9,10 11,12,13 14,15 End

b)

What test data will you use to test the above program using statement coverage? CompoundInterestRate = 10, SimpleInterestRate = 5 Execution will take place till step number 4 and then exits ie : Print Compound Interest Investment is better END CompoundInterestRate = 5, SimpleInterestRate = 10 Execution will take place till step number 15 and then exits What test data will you use to test the above program using branch coverage? CompoundInterestRate = 20, SimpleInterestRate = 5 Execution will take place till step number 4 and then exits ie : Print Compound Interest Investment is better END CompoundInterestRate = 5, SimpleInterestRate = 5 Execution will take place till step number 4 and then exits ie : Print Compound Interest Investment is better END CompoundInterestRate = 5, SimpleInterestRate = 20 Execution will take place till step number 15 and then exits

c)

d) What test data will you use to test the above program using path coverage?

Ans: Similar to test data used in Branch Coverage in this case as all paths are tested by the test data in the Branch Coverage.

Q2) The current use case recommends the products to the customer based on their gender ie: whether its a male or a female and depending on that it offers the related products. The firm wants to recommend products based on what other similar customers purchased in the past. So to modify the use case description and the data dictionary to satisfy this requirement the following needs to be done: The use case would have to take into account about profile information of the customer. Record the past purchasing behavior / pattern of the customer. Collect information of his interest in the various products .

Match his past purchasing patterns to similar customers in the system Recommend what those similar customers purchased in the past for this customer.

Below is the use case description : Use Case: Recommend Product Use Case Description: Primary Actor: Customer

Normal Flow of Events: 1. 2. 3. 4. 5. Retrieve customer data from customer file. Retrieve the purchase history of the current customer. System finds the liking of the customer by getting to know the attributes of the product- clothing or movies etc customer he/she is interested . System compares multiple customers informationcollected via profiles, questionnaires, and purchasing histories and finds those with similar tastes. Recommend products based on the taste of the similar customers found.

Data Dictionary Customer file = customer ID + customer name + gender + age +address Purchase history= customerID + orderdate + productID +{ itemcount} + cost Productdepartment=[electronics|clothing|shoes|.] Product=ProductID + description + color + {size} + quantity + price each

Q3)

Member -MemberNo : Integer -Name : String -Address : String -Phone no : Integer -Credit Card : Integer -CC expiration : Date -Username : string -Password : String

RentalItem -ItemNumber : Integer -Title : String -Director : string -Release Date : int -Type : string -Brief Story -Mpaa rating ActorData -Name : String -Gender : String * *

0..* 1

* 1

* MovieList -Title : String -ShippingStatus : String

* ReviewData -ReviewerName : String -ReviewerRating : String -Comments : String

2) Transform the class diagram into a relational database design Ans: Member (MemberNo, FirstName, LastName, Street, City , State, Zip code, Phone no,Credit Card, CC expiration, Username , Password) MovieList(Movie ID, Title, Shipping Status , MemberNo) MovieList.MemberNo REFERENCES Member.MemberNo ReviewData(Reviewer ID , ReviewerFirstName, Reviewer Last Name, ReviewerRating, Comments,ItemNumber) ReviewData.ItemNumber REFERENCES Rental Item.ItemNumber Actor(Actor ID , FirstName, Last Name ,Gender) RentalItem( ItemNumber,Title,Director,Release date, Type,Brief Story , Mpaa rating) RentalItem.MemberNo REFERENCES Member.MemberNo RentalItem.ActorID REFERENCES Actor.Actor ID

3) Normalize the database design into III normal form. Ans: There were multivalued attributes present in the database design as: Member class- name , address which have been split up to first name ,last name , street name ,city , zipcode. Actor class did not have a unique primary key so actor id has been included as a primary key.

Movielist also the title of the movie cannot be a primary key as its not unqiue , thus a movie id is included to be a primary key. Reviewer Data class also does not have a unique primary key as name attribute cannot be unique. So Reviewer ID is a unique primary key added for the Review Data class. Since there are no partial or transitive dependencies in the tables now , the database design is in the third normal form as shown below.

Member PK Memberno FirstName Last Name Street Name City State Zip code Phone Credit Card Username password has MovieList PK Movie ID PK Title Shipping status Memberno PK

RentalItem Item Number Director Release Date Type Brief Story Mpaa rating Title Memberno Actor ID PK is a part of First Name Last Name Gender Actor Actor ID

rents

FK1 FK2

reviews

ReviewData Reviewer ID Reviewer FirstName Reviewer Last Name Reviewer rating Comments Item Number

FK1

FK1

Das könnte Ihnen auch gefallen