Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 1: TEST PLAN [5 pts] Write a test plan consisting of a series of tests and desired outcomes to completely test Project 1 based

Exercise 1: TEST PLAN [5 pts]

Write a test plan consisting of a series of tests and desired outcomes to completely test Project 1 based on the specifications provided in Homework 3b. You will need around 30 to 40 tests to go through all the requirements.

Example:

Test 1: Start the program by typing the program name with no arguments.
e.g. ./project1
Outcome: Menu is displayed
Test 2: Select the Print option
Outcome: Displays a message that the list is empty
Test 3: Select the Add Option and add the following information:
113344
John Smith
1111 Dole St.,
Honolulu, HI 96822
Outcome: Record gets added and confirmation is displayed to the user.

Exercise 2: ALGORITHMS [5 pts]

Submit the following:

Revised algorithm for the addrecord and deleterecord with C code

Below each line in the algorithm, write the corresponding C code. If needed, insert curly braces (keep the indents unchanged!).

Example: If you have the following pseudocode,

define an int called i if( i is not 0 ) copy 0 to i

You need to insert lines of C code like this.

define an int called i int i; if( i is not 0 ) if( i != 0 ) { copy 0 to i i = 0; }

Traces that verify the algorithm for the following test cases:

Adding two duplicate records to an empty list

Beginning with a list that consists entirely of two duplicate records, delete all duplicates so you end with an empty list.

-------------------------------------------------------------------------------------

This is my psudocode:

-----------------------------------

addRecord

------------------------------------

addRecord()

define a pointer to record called temp

allocate space on the heap and store its address into temp

copy from uaccountno to accontno in record whose address is in temp

copy from uname to name in record whose address is in temp

copy from uaddress to address in record whose address is in temp

copy null to next in record whose address is in temp

if(start is null)

copy from temp to start

else

define a pointer to record called s

copy from start to s

while(next from record whose address is in s is not null)

copy from next from record whose address is in s to s

copy from temp to next from record whose address is in s

-----------------------------------

deleteRecord

-----------------------------------

deleteRecord(define an int called accNo)

if(start is not null)

define a record called temp

copy from start to temp

while(next from record whose address is in temp is not NULL)

if(accNo is accountno from record whose address is in start and next from record whose address is in start is NULL)

release the space whose address is in temp

copy NULL to start

else if(accNo is accountno from record whose address is in start)

copy from next from record whose address is in start to start

release the space whose address is in temp

else if(accNo is accountno from record whose address is in next)

define a record called temp1

copy from next from record whose address is in temp to temp1

copy from next from record whose address is in next to next

release the space whose address is in temp1

else

copy from next from record whose address is in temp to temp

the language is C

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

How could managers be rewarded in the new process?

Answered: 1 week ago