[Solved] : Question 143313

Your class should have the following methods:

  • A constructor. Given a string, it will construct an inventory (a count) of the alphabetic letters in the given string, ignoring the case of letters and ignoring any non-alphabetic characters.
  • Get. Takes a letter, and returns a count of how many of this letter are in the inventory. Letter might be lowercase or uppercase (your method shouldn’t care). If a nonalphabetic character is passed, your method should throw a user-defined exception having a meaningful name.

Set. Takes a letter and a value, and sets the count for the given letter to the given value. The letter might be lowercase or uppercase. If a nonalphabetic character is passed, your method should throw a user-defined exception.


Expert Answer


Answer to : Question 143313

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?