QUESTION 1 PROBLEM: Create your own massive multiplayer online game (MMORPG) hero. Use a class named 'Character' with string variables 'fullname', 'weapon', 'vision', and integer variables 'str', 'agi', 'intel'. Ask the user to input his/her first name, middle name, and surname. The code should accept first names with spaces like Juan Carlo and surnames like Dela Cruz. Assign the number of characters in the first name as the 'str' of the hero. For example, the first name Juan Carlo should have a character count of 9 thus the 'str' of the hero would be equal to 9. Assign the number of letters of the middle name as the 'agi' and the number of letters of the surname as the 'intel'. Combine the first name, middle name, and last name and assign it as the 'fullname' of the hero. If the last letter f the middle name is a vowel, the 'weapon' assigned should be a sword, otherwise assign a bow. If the total number of letters of the full name is less than 15 set the value of 'vision' to Pyro, otherwise set the value to Cryo. For example, the name Juan Carlo Romero Dela Cruz has 23 letters, therefore the 'vision' should be Cryo. Implement the instructions mentioned above by creating an object of the class Character and then use a void function to print the hero details. Allowed built-in functions: getline(), length() SPECIFICATIONS: - You may only use the codes that we studied in our lectures and those that are allowed by the problem. - You are required to use OOP and functions. - All lines of codes should have a comment. - Save your cpp file as Surname FE (Example: Pangaliman_FE.cpp) TEST CASES: Correct: Incorrect: First Name: Juan Carlo First Name: Juan Carlo Middle Name: Romero Middle Name: Last Name: Romero Last Name: Dela Cruz ====== Character Details: Character Details: Name: Juan Carlo Romero Dela Cruz Name: Romero STR: 9 STR: 6 AGI: 6 AGI: 0 INTEL: 8 INTEL: 0 Weapon: Sword Weapon: Bow Vision: Pyro Vision: Cryo ===== Browse Local Files Browse Content Collection Attach File

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter3: Using Methods, Classes, And Objects
Section: Chapter Questions
Problem 1GZ
icon
Related questions
Question
100%

use c++ language

QUESTION 1
PROBLEM:
Create your own massive multiplayer online game (MMORPG) hero.
Use a class named 'Character' with string variables 'fullname', 'weapon', 'vision', and integer variables 'str', 'agi', 'intel'.
Ask the user to input his/her first name, middle name, and surname. The code should accept first names with spaces like Juan Carlo and surnames like Dela Cruz.
Assign the number of characters in the first name as the 'str' of the hero. For example, the first name Juan Carlo should have a character count of 9 thus the 'str' of the hero would
be equal to 9. Assign the number of letters of the middle name as the 'agi' and the number of letters of the surname as the 'intel'.
Combine the first name, middle name, and last name and assign it as the 'fullname' of the hero. If the last letter of the middle name is a vowel, the 'weapon' assigned should be a
sword, otherwise assign a bow. If the total number of letters of the full name is less than 15 set the value of 'vision' to Pyro, otherwise set the value to Cryo. For example, the name
Juan Carlo Romero Dela Cruz has 23 letters, therefore the 'vision' should be Cryo.
Implement the instructions mentioned above by creating an object of the class Character and then use a void function to print the hero details.
Allowed built-in functions: getline(), length()
SPECIFICATIONS:
- You may only use the codes that we studied in our lectures and those that are allowed by the problem.
- You are required to use OOP and functions.
- All lines of codes should have a comment.
- Save your cpp file as Surname FE (Example: Pangaliman_FE.cpp)
TEST CASES:
Correct:
Incorrect:
First Name: Juan Carlo
First Name: Juan Carlo
Middle Name: Romero
Middle Name: Last Name: Romero
Last Name: Dela Cruz
Character Details:
Character Details:
Name: Romero
Name: Juan Carlo Romero Dela Cruz
STR: 9
STR: 6
AGI: 6
AGI: 0
INTEL: 8
INTEL: 0
Weapon: Sword
Vision: Cryo
Weapon: Bow
Vision: Pyro
Attach File
Browse Local Files
Browse Content Collection
Click Save and Submit to save and submit. Click Save All Answers to save all answers.
100 points
Save All Answers
Save Answer
Save and Submit
Transcribed Image Text:QUESTION 1 PROBLEM: Create your own massive multiplayer online game (MMORPG) hero. Use a class named 'Character' with string variables 'fullname', 'weapon', 'vision', and integer variables 'str', 'agi', 'intel'. Ask the user to input his/her first name, middle name, and surname. The code should accept first names with spaces like Juan Carlo and surnames like Dela Cruz. Assign the number of characters in the first name as the 'str' of the hero. For example, the first name Juan Carlo should have a character count of 9 thus the 'str' of the hero would be equal to 9. Assign the number of letters of the middle name as the 'agi' and the number of letters of the surname as the 'intel'. Combine the first name, middle name, and last name and assign it as the 'fullname' of the hero. If the last letter of the middle name is a vowel, the 'weapon' assigned should be a sword, otherwise assign a bow. If the total number of letters of the full name is less than 15 set the value of 'vision' to Pyro, otherwise set the value to Cryo. For example, the name Juan Carlo Romero Dela Cruz has 23 letters, therefore the 'vision' should be Cryo. Implement the instructions mentioned above by creating an object of the class Character and then use a void function to print the hero details. Allowed built-in functions: getline(), length() SPECIFICATIONS: - You may only use the codes that we studied in our lectures and those that are allowed by the problem. - You are required to use OOP and functions. - All lines of codes should have a comment. - Save your cpp file as Surname FE (Example: Pangaliman_FE.cpp) TEST CASES: Correct: Incorrect: First Name: Juan Carlo First Name: Juan Carlo Middle Name: Romero Middle Name: Last Name: Romero Last Name: Dela Cruz Character Details: Character Details: Name: Romero Name: Juan Carlo Romero Dela Cruz STR: 9 STR: 6 AGI: 6 AGI: 0 INTEL: 8 INTEL: 0 Weapon: Sword Vision: Cryo Weapon: Bow Vision: Pyro Attach File Browse Local Files Browse Content Collection Click Save and Submit to save and submit. Click Save All Answers to save all answers. 100 points Save All Answers Save Answer Save and Submit
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
JQuery and Javascript
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage