SWE316 - Assignment 2
SWE316 - Assignment 2
Assignment # 2
Name ID
Objectives:
The main goal of this assignment is to practice with the various design principles discussed in the class.
Problem Description:
Data analysis is manipulation plays a great role in current IT projects. Most clients use spreadsheet programs such as Microsoft Excel to store their data as shown in the figure below.
The client of this application would like to have the value of column Y to be as close to column T as possible. You can only change the r value (column U). The formula to calculate column Y is: resAll = cH + (cR (cU * cH)) / (1 + cU) + (cS (cU * cI)) / (1 + cU ^ 2)+ (cS (cU * cI)) / (cU * (1 + cU ^ 2)) where cX means the value of column X. To do this, I wrote a program to loop the value of r from 0 to 1 with increment of 0.00001. The only problem is that retrieving values from the spreadsheet takes time (unlike reading from a variable). The code that accomplishes this functionality is shown below.
Task 1:
Try to understand the problem and the given code.
Task 2: Efficiency
Identify and modify the code so that it can perform better than its current state.
Columns are limited in number and names smallest _ptDiff is a static value The increments value is not flexible it will work only with a file contains 1000 rows.
How to resolve:
-
Using Parameter for the inputs and the output. Identify the real unacceptable value and the increments value for any excel file