Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help with this C++ code An example of how the output should be: forbidden names for code: C++ Arrays + File Input Assignment: Fantasy

Please help with this C++ code image text in transcribed
image text in transcribed
An example of how the output should be:
image text in transcribed
forbidden names for code:
image text in transcribed
C++ Arrays + File Input Assignment: Fantasy Character Name Generator Skills to be obtained: Reinforce skills with loops, conditional statements, random numbers and functions Read in data from file . Create and use arrays Assignment Write a C++ code that generates a randomized name for a fantasy character This is a slightly longer homework assignment than you're used to! Don't procrastinate! You may work with others on this assignment but you must credit them in the header of the code and the report, and chodit the work you submit must be your own! This is a slightly longer homework assignment than you're used to! Don't procrastinate! You may work with others on this assignment but you must credit them in the header of the code and the report, and the work you submit must be your own! nts The code must have the following features/abilities: Ask the user whether they would like to generate a short name or a long name for their character. Short names will contain three characters, long names will contain six characters. Ensure that the generated name has at least one vowel If the generated name has no vowels, the code should select a random character and replace it with a vowel. . The letter Y counts as a vowel for this assignment. Check the generated name against a list of names that are forbidden in the realm and change it if necessary. You should download the file of forbidden names from this canvas assignment, (Don't forget that you need to put it in the correct folder!) Your code may assume that these are the only forbidden names, that there are only three of them and that they are all three letters long Utilize at least one user-defined function . If you're unsure what to write as a function, one suggestion is to write a function that converts integers from 1-26 to alphabetic characters. Another function that might be useful is one that converts an integer between 1 and 6 to the vowels A, E.L.O.U.Y Print the names to the screen Also show the original'no-vowels and/or forbidden version (see examples below) 35 Pseudocode (5-10 bullet points) o Results screenshots of two long and two short generated names. Show at least one instance of a short name that initially had no vowels and was modified Screenshots should include something that indicates your name like my example below Fortunamenter you can see that it's me! C:\user..saylion Projects\FantasytaneGenerator cake-build-debug\Fantasyameel Would you like to generate a tong (1) or short (s) mane? GWF GAF Original and corrected nare shown process finished with exit code Screenshot where you've forced the name to be a forbidden name and its correction you'll likely have to hard code in a forbidden name then you just comment out this line for normalusek Fantanamente C:\Users: Jay\CLion Projects antasyametenerator cake bu110-seougl Fantasytumeten Houtd you like to generate a long (1) or short (6) ? The name we generated first 1: BAT After se checked to ensure there was a vosel, the new nase is: BAT Ne checked the name against the forbidden names of the reats and now it's BET Process Finished with exit code BAT BLA MRE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL Crash Course A Hands On Introduction To Database Development

Authors: Rick Silva

1st Edition

1718503008, 978-1718503007

More Books

Students also viewed these Databases questions