0% found this document useful (0 votes)
56 views5 pages

SWE316 - Assignment 2

This document describes an assignment to improve the efficiency and flexibility of code that analyzes data from a spreadsheet to calculate column Y values based on other column values. The code currently retrieves values from the spreadsheet for each iteration, which is inefficient. Flexibility issues include hard-coded column names and numbers, as well as static increment values. Proposed improvements include using parameters for inputs/outputs and making increment values flexible for any file size.

Uploaded by

Omar AL-Jumaiah
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views5 pages

SWE316 - Assignment 2

This document describes an assignment to improve the efficiency and flexibility of code that analyzes data from a spreadsheet to calculate column Y values based on other column values. The code currently retrieves values from the spreadsheet for each iteration, which is inefficient. Flexibility issues include hard-coded column names and numbers, as well as static increment values. Proposed improvements include using parameters for inputs/outputs and making increment values flexible for any file size.

Uploaded by

Omar AL-Jumaiah
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

King Fahd University of Petroleum & Minerals College of Computer Sciences and Engineering

Information and Computer Science Department

SWE 316: Software Design and Architecture (Term 121)

Assignment # 2

Name ID

Omar AL-Jameah 200965870

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.

Task 3: Flexibility [5 marks]


Identify some flexibility issues in this code (min 2) and identify how to resolve them.

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

Task 4: Document your work


Notepad++ to write and format the code. CutePDF to convert from Microsoft Word to PDF

You might also like