Question: This program exercises your understanding of containment, composition and class maintenance Additionally, you MUST use Programming By Contract. The goal is to design and implement

This program exercises your understanding of containment, composition and class maintenance Additionally, you MUST use Programming By Contract. The goal is to design and implement the C# classes needed to implement comparative data sets, as described below.

Design and implement two classes, each of which encapsulate distinct closePrime objects.

- The first type, sameLastDigit, uses 2 closePrime objects to identify all pinged values that yield stepped primes with the same last digit. For example, if a trigger object encapsulated closePrime objects with hidden digits 2 and 5 then a pinged value of 81 would satisfy this criterion (2 steps away: 83, 89 => 97; 5 steps away: 83, 89, 97, 101, 103 => 107) while a pinged value of 78 would not. Cumulative statistics may also be released.

- The second type, multiPrime, tracks some number of closePrime objects at a given time and returns the maximum and minimum stepped prime resulting from a query across all encapsulated closePrimes. Supports cumulative statistics Adds/Removes closePrime objects

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!