in IS&Software Engineering retagged by
1,548 views
0 votes
0 votes

A software engineer is required to implement two sets of algorithms for a single set of matrix operations in an object oriented programming language; the two sets of algo­rithms are to provide precisions of 10-3 and 10-6, respectively. She decides to implement two classes, Low Precision Matrix and High Precision Matrix, providing precisions 10-3 and 10-6 respectively. Which one of the following is the best alternative for the imple­mentation?

  • S1: The two classes should be kept independent.
  • S2: Low Precision Matrix should be derived from High Precision Matrix.
  • S3: High Precision Matrix should be derived from Low Precision Matrix.
  • S4: One class should be derived from the other; the hierarchy is immaterial.
  1. S1
  2. S2
  3. S3
  4. S4
in IS&Software Engineering retagged by
1.5k views

2 Answers

1 vote
1 vote
I think answer should be (B).. because we can derive low precision matrix from high precison by some loss of information. eg: high precision one return a. bcdefg (  a 6 bits decimal.) we can derive a low precision depends on how much we want a. bcd (by loss of some information, three bits here).. But on the other hand we can not derive a high precision from a low precision because once a calculation has been done that means once infomation has been lost we can't recover it back.. so deriving high precision from low precision is not possible as per my understanding......

Arjun Sir pls help!!

3 Comments

But if we choose option (b) then we are actually doing Extra amount of Work/Calculations which is not required for Low Precision Matrix Class
0
0
yes.. that is also a valid point.. So is what is the answer and how??
0
0
Dont know bhai confused between S1 and S3 ... answer which I have says S3 without any explanation.

S3 makes sense But then again I am confused that How can we obtain a high precision result starting from a low precision result without doing the calculations all over again.
0
0
0 votes
0 votes
B is the option
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true