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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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