PROBLEM: Using OOP and functions, create a program that allows a user to customize his/her online game character. The program should allow the user to customize two (2) characters, use objects to create the two characters. The program should allow the user to customize the following characteristics: Class, Weapon, and Skill. Use the functions declared within the class to customize the mentioned parameters. Use user defined functions, for example setClass(), setWeapon, and setSkill. For class the user may choose from Knight, Wizard, or Archer. For weapon the user may choose from Sword, Wand, and Bow. For skill the user may choose from Bash, Fire Ball, and Arrow Charge. After customizing the two characters, a summary of the created characters must be printed. All invalid inputs must prompt the user that the input was invalid and should not terminate the program. You may either repeat the process or repeat where the invalid input was made. SPECIFICATIONS: - You may only use the codes that we studied in our lectures. - You are required to use OOP and functions. - All lines of codes should have a comment.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
PROBLEM:
Using OOP and functions, create a program that allows a user to customize his/her online game character.
The program should allow the user to customize two (2) characters, use objects to create the two characters.
The program should allow the user to customize the following characteristics: Class, Weapon, and Skill. Use the functions declared within
the class to customize the mentioned parameters. Use user defined functions, for example setClass(), setWeapon, and setSkill.
For class the user may choose from Knight, Wizard, or Archer.
For weapon the user may choose from Sword, Wand, and Bow.
For skill the user may choose from Bash, Fire Ball, and Arrow Charge.
After customizing the two characters, a summary of the created characters must be printed.
All invalid inputs must prompt the user that the input was invalid and should not terminate the program. You may either repeat the process
or repeat where the invalid input was made.
SPECIFICATIONS:
- You may only use the codes that we studied in our lectures.
- You are required to use OOP and functions.
- All lines of codes should have a comment.
Transcribed Image Text:PROBLEM: Using OOP and functions, create a program that allows a user to customize his/her online game character. The program should allow the user to customize two (2) characters, use objects to create the two characters. The program should allow the user to customize the following characteristics: Class, Weapon, and Skill. Use the functions declared within the class to customize the mentioned parameters. Use user defined functions, for example setClass(), setWeapon, and setSkill. For class the user may choose from Knight, Wizard, or Archer. For weapon the user may choose from Sword, Wand, and Bow. For skill the user may choose from Bash, Fire Ball, and Arrow Charge. After customizing the two characters, a summary of the created characters must be printed. All invalid inputs must prompt the user that the input was invalid and should not terminate the program. You may either repeat the process or repeat where the invalid input was made. SPECIFICATIONS: - You may only use the codes that we studied in our lectures. - You are required to use OOP and functions. - All lines of codes should have a comment.
TEST CASES:
Correct:
Customize your first character:
Select a Class:
[1] Knight
[2] Wizard
[3] Archer
Select: 1
You selected Knight
Select a Weapon:
[1] Sword
[2] Wand
[3] Bow
Select: 1
You selected Sword
Select a Skill:
Select: 1
You selected Bash
Customize your second character:
Select a Class:
[1] Knight
[2] Wizard
[3] Archer
Select: 2
You selected Wizard
Select a Weapon:
[1] Sword
[2] Wand
[3] Bow
Select: 2
You selected Wand
Select a Skill:
[1] Bash
[2] Fire Ball
[3] Charge Arrow
Select: 2
You selected Fire Ball
=======================
First Character Details
Class: Knight
Weapon: Sword
Skill: Bash
Second Character Details
Class: Wizard
Weapon: Wand
Skill: Fire Ball
[1] Bash
[2] Fire Ball
[3] Charge Arrow
Incorrect:
Customize your first character:
Select a Class:
[1] Knight
[2] Wizard
[3] Archer
Select: 1
You selected Knight
Select a Weapon:
[1] Sword
[2] Wand
[3] Bow
Select: 4
Invalid Input
user@MacBook-Air Desktop % (Program Terminates)
Transcribed Image Text:TEST CASES: Correct: Customize your first character: Select a Class: [1] Knight [2] Wizard [3] Archer Select: 1 You selected Knight Select a Weapon: [1] Sword [2] Wand [3] Bow Select: 1 You selected Sword Select a Skill: Select: 1 You selected Bash Customize your second character: Select a Class: [1] Knight [2] Wizard [3] Archer Select: 2 You selected Wizard Select a Weapon: [1] Sword [2] Wand [3] Bow Select: 2 You selected Wand Select a Skill: [1] Bash [2] Fire Ball [3] Charge Arrow Select: 2 You selected Fire Ball ======================= First Character Details Class: Knight Weapon: Sword Skill: Bash Second Character Details Class: Wizard Weapon: Wand Skill: Fire Ball [1] Bash [2] Fire Ball [3] Charge Arrow Incorrect: Customize your first character: Select a Class: [1] Knight [2] Wizard [3] Archer Select: 1 You selected Knight Select a Weapon: [1] Sword [2] Wand [3] Bow Select: 4 Invalid Input user@MacBook-Air Desktop % (Program Terminates)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Variables
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education