Which lines of code should you add to your report?

You create Microsoft Windows-based applications. You are designing the integration test for an application. You write the following lines of code. (Line numbers are included for reference only.)

01 private void cmdCompare_Click(object sender, EventArgs e) { 02 decimal flightFare, carRental, hotelPrice, travelCost; 03 flightFare = wsFlyHigh.GetBestFare(txtOrigin.Text, txtDest.Text, datDateOut, datDateBack); 04 cmdGetRentalPrice.Parameters.Add(“@DAYS”,SqlDbType.Int); 05 cmdGetRentalPrice.Parameters[0].Value=int.Parse(txtDays.Text); 06 carRental = cmdGetRentalPrice.ExecuteScalar();
07 hotelPrice = bigDeal.GetHotelPrice(int.Parse(txtDays.Text)); 08 travelCost = flightFare + carRental + hotelPrice;
09 txtTravelCost.Text = travelCost.ToString(“C”);
10 }

You analyze the code and discover the following features:

wsFlyHigh is a Web service that is hosted on a partners extranet. cmdGetRentalPrice runs a stored procedure on a corporate database server.
bigDeal is a COM component.

You need to create a report that lists the parts of the code to be considered during integration testing.
Which lines of code should you add to your report?

You create Microsoft Windows-based applications. You are designing the integration test for an application. You write the following lines of code. (Line numbers are included for reference only.)

01 private void cmdCompare_Click(object sender, EventArgs e) { 02 decimal flightFare, carRental, hotelPrice, travelCost; 03 flightFare = wsFlyHigh.GetBestFare(txtOrigin.Text, txtDest.Text, datDateOut, datDateBack); 04 cmdGetRentalPrice.Parameters.Add(“@DAYS”,SqlDbType.Int); 05 cmdGetRentalPrice.Parameters[0].Value=int.Parse(txtDays.Text); 06 carRental = cmdGetRentalPrice.ExecuteScalar();
07 hotelPrice = bigDeal.GetHotelPrice(int.Parse(txtDays.Text)); 08 travelCost = flightFare + carRental + hotelPrice;
09 txtTravelCost.Text = travelCost.ToString(“C”);
10 }

You analyze the code and discover the following features:

wsFlyHigh is a Web service that is hosted on a partners extranet. cmdGetRentalPrice runs a stored procedure on a corporate database server.
bigDeal is a COM component.

You need to create a report that lists the parts of the code to be considered during integration testing.
Which lines of code should you add to your report?

A.
03, 04, 05, 06, and 07

B.
03, 06, and 07

C.
03 and 07

D.
07



Leave a Reply 0

Your email address will not be published. Required fields are marked *