1.1 DESCRIPTION Files to submit: newAlphabet.cpp Time it took Matthew to complete: 5 mins · All programs must compile without warnings when using the -Wall and -Werror options · Submit only the files...

1 answer below »
I've attached the question and instructions below. It will take only 5 mins to complete it.


1.1 DESCRIPTION Files to submit: newAlphabet.cpp Time it took Matthew to complete: 5 mins   · All programs must compile without warnings when using the -Wall and -Werror options · Submit only the files requested · You may either submit the file directly or a zip file that contains the files. Make sure not to submit zipped folders unless the assignment says to do so.  · Your program must match the output exactly to receive credit. · Make sure that all prompts and output match mine exactly. · The easiest way to do this is to copy and paste them from here. Be careful about non-ASCII characters though in the HTML as they can cause some weird problems if you put them in your program. · All input will be valid unless stated otherwise · Print all real numbers to two decimal places unless otherwise stated · The examples provided in the prompts do not represent all possible input you can receive. · All inputs in the examples in the prompt are underlined · You don't have to make anything underlined it is just there to help you differentiate between what you are supposed to print and what is being given to your program · If you have questions please post them on CampusWire   You have decided to create an alternative representation for letters of the alphabet. In your scheme the first 26 bits of an unsigned integer representing a character of the alphabet and the 27th bit representing either lowercase or uppercase. The least significant bit (bit 0) is a, the next bit (bit 1) represents b, and so on with the last bit (bit 25) representing z. If the capital bit (bit 26) is 1 it means the letter is uppercase and if it is 0 it means the letter is lowercase. You are to write a program that accepts “letters” in your new representation and then prints out their meaning.   Inputs · Input will be given on the command line (argc and argv) and not through standard input(scanf) · Each “letter” will be represented as an unsigned int · Some examples Letter Numerical Representation Binary Representation a 1 000 0000 0000 0000 0000 0000 0001 A 67108865 100 0000 0000 0000 0000 0000 0001 b 2 000 0000 0000 0000 0000 0000 0010 B 67108866 100 0000 0000 0000 0000 0000 0010 c 4 000 0000 0000 0000 0000 0000 0100 C 67108868 100 0000 0000 0000 0000 0000 0100 d 8 000 0000 0000 0000 0000 0000 1000 D 67108872 100 0000 0000 0000 0000 0000 1000 e 16 000 0000 0000 0000 0000 0001 0000 E 67108880 100 0000 0000 0000 0000 0001 0000   Restrictions 1. You must use bitwise operators to solve this problem 2. You can NOT use the bitset class 3. You cannot just have a chain of if statements comparing against the numeric value of each letter. For example, something similar to the below would not be allowed if(letter == 1) cout < 'a';="" else="" if="" (letter)="=" 2="" cout="">< 'b'="" else="" if="" (letter)="=" 4="" cout="">< 'c' … 4. if you do the above you will receive 0 credit for this problem examples   1. ./newalphabet.out 4 1 524288 you entered the word: cat 2. ./newalphabet.out 100663296 16 67108866 131072 1 you entered the word: zebra 'c'="" …="" 4.="" if="" you="" do="" the="" above="" you will="" receive="" 0="" credit for="" this="" problem="" examples=""  ="" 1.="" ./newalphabet.out 4="" 1="" 524288="" you="" entered="" the="" word:="" cat="" 2.="" ./newalphabet.out 100663296="" 16="" 67108866="" 131072="" 1="" you="" entered="" the="" word:="">
Answered 2 days AfterJun 29, 2021

Answer To: 1.1 DESCRIPTION Files to submit: newAlphabet.cpp Time it took Matthew to complete: 5 mins · All...

Neha answered on Jun 30 2021
139 Votes
#include
#include
using namespace std;
char findWord(unsigned int number);
int main(int arg, char *argv[])
{
cout << "The word is: ";
for(int i = 1; i < arg; i++)
cout << findWord(atoi(argv[i]));
cout << endl << endl;
return 0;
}
char findWord(unsigned int...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here