Write a program that prompts the user to enter a 10 alphabets (A-Z) and converts it to numbers using the following mapping:
A, B, C = 8
D, E, F = 6
G, H, I = 4
J, K, L = 5
M, N, 0 = 7
P, Q, R, S = 2
T, U, V, W = 3
X, Y, Z = 1
Please be sure to use Object Oriented Programming concepts when designing and writing code for this question. Complete class(es) (if more than > 1 class is required) and main() method is required.
#include <iostream>
#include <string>
using namespace std;
// Class Declaration
class alphabets {
public:
void inputprompt(char alpha[])
{
//Get Input Values For Object Varibales
for(int i = 0; i < 10; i++){
cout << "Enter " << i << " alphabet (A-Z):
";
cin >> alpha[i];
}
}
void printing(char alpha[])
{
//Print The number
for(int i = 0; i < 10; i++){
switch (alpha[i])
{
case 'A':
case 'B':
case 'C':
cout << 8 <<endl;
break;
case 'D':
case 'E':
case 'F':
cout << 6 <<endl;
break;
case 'G':
case 'H':
case 'I':
cout << 4 <<endl;
break;
case 'J':
case 'K':
case 'L':
cout << 5 <<endl;
break;
case 'M':
case 'N':
case 'O':
cout << 7 <<endl;
break;
case 'P':
case 'Q':
case 'R':
case 'S':
cout << 2 <<endl;
break;
case 'T':
case 'U':
case 'V':
case 'W':
cout << 3 <<endl;
break;
case 'X':
case 'Y':
case 'Z':
cout << 1 <<endl;
break;
}
}
}
};
//Main Function
int main() {
//Variable Declaration
char alpha[10];
// Object Creation For Class
alphabets o1, o2;
o1.inputprompt(alpha);
o2.printing(alpha);
return 0;
}

Write a program that prompts the user to enter a 10 alphabets (A-Z) and converts it...
Assignment: Write a program that prompts the user to enter 10 numbers, and then displays the mean and standard deviation of these numbers I already have the source code all done. I just need this translated into a flowchart. Again I just need the flowchart, not any source code. I have already provided the source code below. Need Flowchart version of my code Here is the source code: public class Mean_Standard_Deviation { public static void main(String[] args) { ...
Write a program that prompts the user to enter a character, an integer, and floating point number. After reading the input, the program should print out the values entered. Be sure to format the code correctly and include relevant comments. in c
Problem 1.Write a program that prompts the user to enter the number of milliseconds and converts the milliseconds to a string hours:minutes:seconds. The program should use the convertMillismethod with the following header:public static String convertMillis(long millis)For example, convertMillis(5500) returns the string 0:0:5, convertMillis(100000) returns the string 0:1:40, andconvertMillis(555550000) returns the string154:19:10.Problem 2. (Count occurrence of numbers)Write a program that reads integers between 1 and 100 and counts the occurrence of each (you should store the numbers in an array). Output...
Exercise #3: write a Java program that prompts the user to enter a sentence. The program has to find the print: a. the position of vowels in the sentence. b. the number of vowels in the sentence (A, a, U, u, E, e, O, o, I, i) c. the number of characters as numbers or special characters (other than English letters a.z, A..Z). Hint: remember to ignore the spaces. Sample input-output: Enter the sentnse: UAEU is the university of the...
1. Write a program that prompts the user to enter three integers and display the integers in non-decreasing order. You can assume that all numbers are valid. For example: Input Result 140 -5 10 Enter a number: Enter a number: Enter a number: -5, 10, 140 import java.util.Scanner; public class Lab01 { public static void main(String[] args) { Scanner input = new Scanner(System.in); } } ---------------------------------------------------------------------------------------------------------------------------- 2. Write a program that repeatedly prompts the user for integer values from...
Program must be in Python 3.
Write a program that prompts the user to enter two strings and then displays a message indicating whether or not the first string starts with the second string. Your program must satisfy the following requirements. 1. Your program must include a function called myStartsWith that takes two string parameters. This function returns True if the rst string starts with the second string and returns False otherwise. 2. Your program must include a main function...
USING PYTHON - Write a program that calls a function that prompts the user to enter a real number. The function should verify that the user entered a valid real number, and should prompt the user to re-enter any invalid input. After a valid real number has been entered, the function should return the number as a number. To test your function, from a main function, call the function two separate times and print the sum of the two numbers...
please use java Write a program that prompts the user to enter line of text (including whitespace). The program then replaces the following vocals with numbers: a = 1, e = 2, i = 3, o = 4, u = 5 and outputs the result to the console. The program does not consider case, so a = 1, A = 1, e = 2, E = 2, etc. Example: Input: Hello, how are you? Output: H2ll4, h4w 1r2 y45? The...
Steps: Write a program that upon getting mass value from user, converts it to energy using Einstein’s mass-to-energy conversion equation. You must write a function to calculate energy. Writing the whole thing in main will not get any credit. Note: Conversion equation=> e = m x c^2 Please do these steps: 1-Draw flowchart diagram or write the pseudocode 2-Write your code 3-Run the code 4-Test for all possible inputs!
c++ please
(1) Write a program that prompts the user to enter an integer value N which will rpresent the parameter to be sent to a function. Use the format below. Then write a function named CubicRoot The function will receive the parameter N and return'its cubic value. In the main program print the message: (30 Points) Enter an integer N: [. ..1 The cubic root of I.. ] is 2 update the code om part and write another function...