Question: Define the needed class(es), providing necessary implementation details. Briefly comment on the maintainability of your class(es). Assume that you have been given these fully defined

  1. Define the needed class(es), providing necessary implementation details.

Briefly comment on the maintainability of your class(es).

  1. Assume that you have been given these fully defined and implemented classes:

unique where each unique object supports filter(a) which

accepts integer array a and returns a with all duplicates removed

uLess inherits from unique a and redefines filter(a)

to remove every other integer from a

replace inherits from unique and redefines filter(a)

to replace all multiples of 10 with 0 in the returned array

  1. Reuse the class(es) from IV, adding support for division,

  1. Define one or more classes that are maintainable and provide the functionality of uLessAdd, uLessSub, ulessDiv, replaceAdd, replaceSub, and replaceDiv. Each object
    1. encapsulates an integer r
    2. supports getSeq(x) which returns an array of integers

with a first value of r and subsequent values that uniformly increase or decrease proportional to x and according to type

Reuse the class(es) from IV

  1. In C#, design the class(es) needed so that each object instantiated
    1. encapsulates an integer myNum

myNum is stable but varies from object to object

  1. is associated with one arithmetic operation addition or subtraction
  2. supports reset()
  3. supports process(x)returns a value, according to associated arithmetic operation

myNum + count*x or myNum (count*x)

where count is the number of queries made so far by the client

  1. Define the class(es), providing all implementation details
  2. Briefly comment on the maintainability of your class(es)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!