We have been working very hard since 2009 to facilitate in learning Read More. We can't keep up without your support. Donate.

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

Software Verification and Validation (CS608)

Fall 2020

Assignment # 01

 

       Total marks = 20                                                                              

 

Due Date:

28th November, 2020

 

Please carefully read the following instructions before attempting assignment.

INSTRUCTIONS

It should be clear that your assignment would not get any credit if:

  • The assignment is submitted after the due date.
  • The submitted assignment does not open or file is corrupt.
  • Strict action will be taken if submitted solution is copied from any other student or from the internet.

You should concern the recommended books to clarify your concepts as handouts are not sufficient.

You are supposed to submit your assignment in .doc or docx format.

Any other formats like scanned images, PDF, zip, rar, ppt and bmp etc. will not be accepted.

 

Topics Covered:

·         Control Flow Graph

 

NOTE

No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or Internet issues etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file well before its closing date.

If you find any mistake or confusion in the assignment (Question statement), please consult with your Instructor before the deadline. After the deadline no queries will be entertained in this regard.

For any query, feel free to email at cs608@vu.edu.pk

 

 

Question No. 1.                                                                                                          (Marks 12)

Draw the Control Flow Graph for the following piece of code.

 

namespace AssigmntONE

{

    public class MyAverage

    {

        public double ReturnAverage(int[] value, int MIN, int MAX)

        {

  1. int i, tv, sum;
  2. double av;
  3. i = 0; tv = 0; sum = 0;
  4. while (i < MAX)

            {

 

  1. if (value[i] >= MIN && value[i] <= MAX)

                {

  1. tv++;
  2. sum = sum + value[i];

                }

  1. i++;

            }

  1. if (tv > 0)
  2. av = (double)sum / tv;
  3. else
  4. av = (double)-999;
  5. return (av);

        }

 

    }

}

 

 

 

 

Question No. 2.                                                                                                          (Marks 8)

Find all the independent paths for the graph developed in question 1.

 

 

 

Note:

  • You should use Microsoft Visio or some other drawing tool to develop the required Graph for question#1.
  • The diagram should be pasted in the MS Word file as an image, and the MS Word (.docx) file should be uploaded on VULMS.

 

Your solution must be uploaded on or before 28th Nov 2020

 

 

 v


+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)


Views: 511

Attachments:

Replies to This Discussion

Please Discuss here about this assignment.Thanks

Our main purpose here discussion not just Solution

Students having same subject can start discussion here to solve assignment, GDB & Quiz and can clear their concepts until solution is provided. 

 

P.S:    Please always try to add the discussion in proper format title like “CS101 Assignment / GDB No 01 Solution & Discussion Due Date: ___________”

Then copy Questions from assignment file and paste in Discussion.

 

http://bit.ly/vucodes (For Assignments, GDBs & Online Quizzes Solution)

http://bit.ly/papersvu (For Past Papers, Solved MCQs, Short Notes & More)

Click Here to Search (Looking For something at vustudents.ning.com?)

Click Here to Join (Our facebook study Group)

Idea Please

ksi n bnai h yr assignment?

Kindly Koi solution post kr dy

CS608 Solution Assignment#01 Fall 2020

Click on the below link to download the file 

CS608_Assignment_No_01_Solution_Fall_2020

CS608 Complete Solution Assignment#01 Fall 2020

Click on the below link to download the file

CS608_Complete_Solution-Assignment#01_Fall_2020

CS608 Solution Assignment#01 Fall 2020

Click on the below link to download the file 

CS608_Assignment_No_01_Solution_Fall_2020

CS608 File Solution link 

cs608 assignment no 1 solution

CS608 Assignment 1 solution 2020

Question No. 1. (Marks 12)
Draw the Control Flow Graph for the following piece of code.

namespace AssigmntONE
{
public class MyAverage
{
public double ReturnAverage(int[] value, int MIN, int MAX)
{
1. int i, tv, sum;
2. double av;
3. i = 0; tv = 0; sum = 0;
4. while (i < MAX)
{

5. if (value[i] >= MIN && value[i] <= MAX)
{
6. tv++;
7. sum = sum + value[i];
}
8. i++;
}
9. if (tv > 0)
10. av = (double)sum / tv;
11. else
12. av = (double)-999;
13. return (av);
}

}
}

Solution:

Question No. 2. (Marks 8)
Find all the independent paths for the graph developed in question 1.
Answer:
Independent paths = 13-12+2
Independent paths = 3

CS608 Complete Solution Assignment#01 Fall 2020

Click on the below link to download the file

CS608_Complete_Solution-Assignment#01_Fall_2020

RSS

Looking For Something? Search Below

Latest Activity

+!!!★彡 "Å⫶l̊⫶å⫶n̊⫶ "彡★✓ liked Laila kabeer's discussion !!!!!!!!!! ISHFAQ AHMED!!!!!!!!!!!!!!!!!
9 minutes ago
+!!!★彡 "Å⫶l̊⫶å⫶n̊⫶ "彡★✓ liked + + + + " Tw!nkle "'s discussion Happy HAppy birthday !! FIYA
13 minutes ago
★彡[ꜱʜʏɴᴀ]彡★ posted discussions
3 hours ago
★彡[ꜱʜʏɴᴀ]彡★ replied to + ! ! Pagal Dewani ! ! +'s discussion Ap kase roty hain ....................????
7 hours ago
+ + + + " Tw!nkle " posted a discussion
7 hours ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion ZOO507 Principles of Animal Ecology PPTs Slides With Solved MCQs File in the group ZOO507 Principles of Animal Ecology
9 hours ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion ZOO507 Principles of Animal Ecology PPTs Slides With Solved MCQs File in the group ZOO507 Principles of Animal Ecology
9 hours ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion ZOO507 Principles of Animal Ecology PPTs Slides With Solved MCQs File in the group ZOO507 Principles of Animal Ecology
9 hours ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion ZOO507 Principles of Animal Ecology PPTs Slides With Solved MCQs File in the group ZOO507 Principles of Animal Ecology
9 hours ago
+ M.Tariq Malik liked + M.Tariq Malik's discussion ZOO507 Principles of Animal Ecology PPTs Slides With Solved MCQs File
9 hours ago
+ M.Tariq Malik's 5 discussions were featured
9 hours ago
+ M.Tariq Malik added a discussion to the group ZOO507 Principles of Animal Ecology
9 hours ago

© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.