JAC444 – Solved

$ 24.99
Category:

Description

Applied Arts & Technology

Workshop 4
Notes:
i. Each task should be presented during the lab, demo worth 70% of the workshop marks and code uploading worth the other 30%.
ii. Make sure you have all security and check measures in place, like wrong data types etc., implement the proper Exception Handling in your tasks.
iii. Make your project in proper hierarchy; introduce proper class coherence in your project. Proper packages and your project should be handled by only one main method which should be in a TesterClass.
iv. Given output structure is just for student to have a glimpse what the output can look, students are free to make the output better in any way.

Other inputs can be given during demo, so make sure you test your program properly.

Task 1: Write a program that prompts the user to enter a file name and displays the occurrences of each letter in the file. Letters are case-sensitive. Here is a sample run:

Enter a filename: Somefile.txt
Number of A’s: 56 Number of B’s: 134

Number of Z’s: 9

Task 2: Standard telephone keypads contain the digits zero through nine. The numbers two through nine each have three letters associated with them (figure below). Many people find it difficult to memorize phone numbers, so they use the correspondence between digits and letters to develop seven-letter words that correspond to their phone numbers.
For example, a person whose telephone number is 686-2377 might use the correspondence indicated in below figure to develop the seven-letter word “NUMBERS.” Every seven-letter word corresponds to exactly one seven-digit telephone number. A restaurant wishing to increase its takeout business could surely do so with the number 825-3688 (i.e., “TAKEOUT”).

Every seven-letter phone number corresponds to many different seven-letter words, but most of these words represent unrecognizable juxtapositions of letters. It’s possible, however, that the owner of a barbershop would be pleased to know that the shop’s telephone number, 4247288, corresponds to “HAIRCUT.” A veterinarian with the phone number 738-2273 would be pleased to know that the number corresponds to the letters “PETCARE.” An automotive dealership would be pleased to know that the dealership number, 639-2277, corresponds to “NEWCARS.”

Your task is to write a program that, given a seven-digit number, write to a file every possible seven-letter word combination corresponding to that number. There are 2,187 (37) such combinations. Avoid phone numbers with the digits 0 and 1.

Reviews

There are no reviews yet.

Be the first to review “JAC444 – Solved”

Your email address will not be published. Required fields are marked *