Johnson Bill

Johnson Bill

  • 1.6k
  • 62
  • 3k

Design an OOP solution with reusable code

Mar 13 2022 8:35 PM

Hi,

I'd like to designe an OOP solution in C# that does the following:

1. counts occurences of a specific letter in a string.  e.g ('l',"Hello world") => 3
2. counts occurences of a specific digit in a number e.g. (2,2546522772) => 4
3. Adds two numbers together. e.g (2,5) => 7

How would you design the program ?

I'm NOT interested in code for the 3 functions, I am more interested in a good Object Oriented program design.

Thank you.

 


Answers (1)