0% found this document useful (0 votes)
5 views2 pages

Lesson8 Practice Assessment Daybeforexamen

The document outlines instructions for a C# console application that includes two main functionalities: an Entire Alphabet Checker to verify if a string contains all letters of the English alphabet, and a Longest Common Prefix Checker to find the longest common prefix among a list of strings. It provides user interaction examples and emphasizes the importance of input validation and feedback. Grading criteria focus on program behavior, code quality, and organization.

Uploaded by

cachbueno1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Lesson8 Practice Assessment Daybeforexamen

The document outlines instructions for a C# console application that includes two main functionalities: an Entire Alphabet Checker to verify if a string contains all letters of the English alphabet, and a Longest Common Prefix Checker to find the longest common prefix among a list of strings. It provides user interaction examples and emphasizes the importance of input validation and feedback. Grading criteria focus on program behavior, code quality, and organization.

Uploaded by

cachbueno1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Assessment Problem - Alphabet Checker

Instructions
Write a console application in C# that allows a user to interact with the following
tests:

1. Entire Alphabet checker


A program that checks if a given string contains all the letters in the English
alphabet.
This program option should provide the following:

Prompt a user for a string input


Validate that the input is of the correct type
Provide feedback and re-prompt the user if the type is incorrect
Check if the string contains all the letters in the English alphabet.
If the input string contains all letters, print a message to the console stating
that.
If the input string does not contain all letters, print a message to the console
state which letters are missing.
Longest Common Prefix Checker
Prompt the user for a comma separated list of strings (e.g. daisy, dairy, darts,
dais, dame).
Validate that the input is of the correct type
Provide feedback and re-prompt the user if the type is incorrect
Find the longest common prefix shared among all of the strings in the argument, or
an empty string if there is none and show the result to the user
For example, ({daisy, dairy, darts, dais, dame}) returns "da".

Example User Interaction


Choose an option:

1. Entire Alphabet Checker

2. Longest Common Prefix Checker

3. Exit

> 1

Enter a string (sentence or paragraph):

> The quick brown fox jumps over the lazy dog

The provided string contains all the letters in the alphabet.

Choose an option:

1. Entire Alphabet Checker

2. Longest Common Prefix Checker

3. Exit

> 2

Enter a comma separated list of words:

> daisy, dairy, darts, dais, dame

The longest common prefix is "da".


1. Entire Alphabet Checker

2. Longest Common Prefix Checker

3. Exit

> 3

Thanks for playing!

Grading Criteria
40% - Program Behaviour and Functionality
Your program behaves and functions correctly according to the above instructions
Your program returns correct results
40% - Code Quality
Your program make good use of data structures where appropriate
Your program makes good use of methods for organizing your logic
20% - Organization and Clarity
Your code is readable and clearly organized, with helpful variable names and
comments if and where appropriate.

You might also like