Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Based on the code provided below, solve the following questions: 1 public String Compute(int [] marks) int size-marks.length-1; int pass=, fail-e, sumPass-, sumFail-; int 1-0:

image text in transcribed
Based on the code provided below, solve the following questions: 1 public String Compute(int [] marks) int size-marks.length-1; int pass=, fail-e, sumPass-, sumFail-; int 1-0: while( i= size) { if(marks[i]>-50) { pass; sumPass++; 12 else fail++; SunFail : 3 4 5 6 7 8 10 11 13 14 15 16 12 18 19 20 21 22 return "Average of Pass (sumpass/pass)+" Average of fails="+(sumFail/fail); Question (1): Draw Program Dependency Graph (PDG) for the above shown program. [3 marks] Question (2): Find Program Slice for the above shown program under the slice criterion 21, sumPass> using Backward static slicing. [3 marks] Question (3): Find Dynamic Program Slice for the above shown program under the slice criterion 14 marks Based on the code provided below, solve the following questions: 1 public String Compute(int [] marks) int size-marks.length-1; int pass=, fail-e, sumPass-, sumFail-; int 1-0: while( i= size) { if(marks[i]>-50) { pass; sumPass++; 12 else fail++; SunFail : 3 4 5 6 7 8 10 11 13 14 15 16 12 18 19 20 21 22 return "Average of Pass (sumpass/pass)+" Average of fails="+(sumFail/fail); Question (1): Draw Program Dependency Graph (PDG) for the above shown program. [3 marks] Question (2): Find Program Slice for the above shown program under the slice criterion 21, sumPass> using Backward static slicing. [3 marks] Question (3): Find Dynamic Program Slice for the above shown program under the slice criterion 14 marks

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

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions

Question

Identify how culture affects appropriate leadership behavior

Answered: 1 week ago