All the projects should be implemented as GUI applications (using C# in Microsoft Visual Studio). You should upload the entire solution, however delete .obj and .bin folders before zipping. Make sure that.sln file is in the top folder, i.e. don’t add another layer above it to your .zip hierarchy.
One of the most important principles in programming is coding in the most general way, i.e. the source code should not change, besides, maybe, constants, when a different data set should be processed.

Your programs should be easy to maintain. Suppose, the next assignment is to modify Task 1 by not counting Y’s. For the change like this, your program should have only one spot to modify. Using constants and enumerations are good means to meet this criterion.
Don’t forget about your friend Debugger!
Read the tasks carefully (slowly). Some conditions may appear strange but there are many applications where artifacts are composed of pieces (found in the environment or in the input) even in a more surprising way.

Task 1
Write a program named CountVowels that accepts a phrase from the user and counts
the number of vowels in the phrase. The entered phrase may consist of several words, separated by spaces. Your program should work even if there is just one character in the input phrase.
A, E, I, O, U, Y and the correspondent lower case letters should be counted as vowels.
Additionally, calculate a total count of all instances of X- and x- when they are found in the beginning of a word (e.g. X-rated).
Output both counts, including zero values (each phrase should produce an output of two numbers).

// (Note- Task 1 is a modified version of the following question from the Microsoft C# 2015 book
13. Write a program named CountVowels that accepts a phrase from the user and counts the number of vowels in the phrase. For this exercise, count both uppercase and lowercase vowels, but do not consider y to be a vowel.

Farrell, Joyce (2015-06-03). Microsoft Visual C# 2015: An Introduction to Object-Oriented Programming (Page 225). Cengage Learning.

Task 2
The program should output the lines that begin with consecutive whole numbers. Start with the number MIN and end with the number MAX (these two values are the required input; MIN <=
MAX). If any of these numbers have prime factors, list them on the same line (separated by colons) in ascending order.
Below is an example of the output for MIN = 6 and MAX = 9.
Obviously, you should not pre-populate your program with a table of prime factors.
No task in this class require any knowledge beyond high school math. If you need to refresh the meaning of a particular term, Wikipedia is a good source.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace CountVowels
    public partial class Form1 : Form
       public Form1()

       private void button1_Click(object sender, EventArgs e)
            // get phrase from the input
            string phrase = textBox2.Text;

            // init counting variable
            int vowel = 0;
            int x_ = 0;

            // we will iterate thí aray to know whether the currently considered character is a vowel
            char [] vowsls = new char [] {'A', 'E', 'I','O', 'U', 'Y','a', 'e', 'i', 'o', 'u','y' };

            // the current character
            char a;
            // charater that follows the current chartater in the string
            char _;

            // itaterate over the phrase
            for (int i = 0; i < phrase.Length; i++)
$40.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available C-Family Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats