CSCI 717 Software Construction Assignment Problem

Assignment Help Computer Engineering
Reference no: EM132395227

Assignment: CSCI 717 Software Construction, North Dakota State University

1. (Operands and options)

Examine a library class that involves both options and operands, and discuss whether it follows the operand principle.

2. (Sentinel values for performance improvement)

Measure and compare the average performance of the following code. Describe your method, justify why your method is reasonable, and attach your running code and experiment results.

a) int [] item;

boolean find(int testValue) { boolean found =false; int i=0; while ( (!found) && (i<item.length) ) { if (item[i] == testValue)

found=true;

else

i++;

}

return found;

}

b) int [] item;

boolean find(int testValue) { int initialValue = item[item.length-1]; item[item.length-1] = testValue;

int i=0; while (item[i] !=testValue) { i++;

}

item[item.length-1] = initialValue; return i< item.length-1 || testValue==initialValue;

}

3. (Loop unrolling for performance improvement)

Measure and compare the average performance of the following code (suppose numIterations is large enough). Describe your method, justify why your method is reasonable, and attach your running code and experiment results.

a) double ComputeSum(int numIterations) {

int i;

double sum = 0.0; for (i = 0; i < numIterations; i++) { sum += 1.0;

}

return sum;

}

b) double ComputeSum (int numIterations) {

double sum0, sum1, sum2, sum3, sum4, sum5, sum6, sum7;

int i;

double sum = 0.0;

sum0 = sum1 = sum2 = sum3 = sum4 = sum5 = sum6 = sum7 = 0.0;

for (i = 0; (i+7) < numIterations; i += 8) { sum0 += 1.0; sum1 += 1.0; sum2 += 1.0; sum3 += 1.0; sum4 += 1.0;

sum5 += 1.0; sum6 += 1.0; sum7 += 1.0;

}

sum = sum0 + sum1 + sum2 + sum3 +sum4 +sum5 + sum6 + sum7; for (;i<numIterations; i++) { sum += 1.0;

}

return sum;

}

Reference no: EM132395227

Questions Cloud

Implementation of a new performance management system : Explain why these performance management systems are unique/innovative and Explain how smaller organizations can implement these systems and detail the benefits
What would we expect the current price of a treasury : What would we expect the current price of a treasury note with a maturity of 3 periods and a coupon rate of 5% per period to be?
Investing in all 100 of the ftse 100 stocks : Describe how we can design a portfolio of the 30 largest stocks that mimic the FTSE 100 and why do you choose this instead of investing in all 100 of the FTSE
Cost of capital and value of the firm : The X firm is currently financed with 100% equity and the cost of equity for this unlevered firm is 10%. Suppose the cost of debt is 4% (before tax)
CSCI 717 Software Construction Assignment Problem : CSCI 717 Software Construction assignment help and solutions, North Dakota State University, assessment help - Examine a library class that involves both option
Where is cost of capital different from rate of return : If said company is completing an assembly line at a cost of $8.5 million. The company expects the project to generate cash flows of $2 million
Performance management systems problem : Performance Management Systems Assignment Help and Solution, Colorado State University Global, Homework Help - Explain the importance of performance management.
Value of the company to the stockholders : Earnings per share continued to grow. What would be the value of the company to the stockholders? Why?
What would be expected return on investment : What would be your expected return on this investment in the next 5 years? Use 2 decimals. Show your complete work

Reviews

Write a Review

Computer Engineering Questions & Answers

  Describe policy questions and issues your company might face

Export controls place restrictions on the export of software and technology in the USA and they play a significant role in foreign policy and national security.

  Draw the searching tree

Draw the searching tree and solve using any applicable searching strategy. The squares colored as grey cannot be used.

  What is the polymorphic assingment

Why do C++'s capabilites of (polymorphism, encapsulation, inheritance) make programming difficult?what is the polymorphic assingment.

  What is the maximum directly addressable memory capacity

SCO 104 Computer Organizations and Architecture I- What is the maximum directly addressable memory capacity (in bytes)? How many bits are needed for the program counter and the instruction register?

  What are strategies to use in testing

What are strategies to use in testing? How do you prove to the stakeholders that the testing was successful? What do you do with testing data?

  Calculate area and length of the boundary of field

Define a class called Plot that has private members of length and width. Include a constructor and a public function that calculates the area and the length of the boundary of the field.

  Test incrementing the time into the next day

Write a program to test the new class DateAndTime. Specifically, test incrementing thetime into the next day.

  Problem based on biomedical computer applications

Problem based on Biomedical Computer Applications. Create a VI to calculate the equation below and try it with these numbers. a = -4, b = 8, j=6, k=-5 Out = __.

  Compare characteristics of classic and modern cryptography

Compare and contrast the characteristics of classic and modern cryptography. (Maximum: Half a Page, double-spaced). References and in-text citations must.

  Write down a 2-3 page paper that answers the questions

write a 2-3 page paper that answers the questions below. be prepared to fully support your answers. explain in your own

  Implement a two-pass linker

You are to implement a two-pass linker and submit the source code, which we will compile and run. Submit your source code together with a Makefile as a ZIP file with directory through NYU Classes assignment

  Discuss the approach of publishing an article

We are getting close to the residency on June 15-17. This assignment will be shared with your group to generate a discussion for the group project during.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd