Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 2 3 pts Question 3 The simple program below has one or more bugs in it. Select the line number for each bug. Sianna

image text in transcribed

Question 2 3 pts Question 3 The simple program below has one or more bugs in it. Select the line number for each bug. Sianna is building a text-based dungeon adventure game. She needs to implement a control system that does different actions based on user input. Select the one code block below that will let the user select an action without causing a compilation error OR a logical error. The action menu in Sianna's game is: #include int main(){ 1) List Inventory ifstream myFile.open("input.txt"); //Line 3 2)Check Map 3)Use Healing char fileChar; //Line 4 myFile >> fileChar; //Line 5 if (fileChar += 7) cout > user Choice; if('1') cin >> user Choice; list_inventory: switch (userChoice) { A Line 3 hoice) case 1: Line 6 else if('2') list_inventoryo: Line 4 show_map(): case 2: Line 5 show_map0: else if ('3') Question 4 3 pts case 3: heal_player(); heal_player(: default: Select the correct value for the boolean variable A after this block of code has run: elsel cout > userChoice; switch (userChoice) { C No answer text provided. D A = (B && (C > D)) || (A && (D

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

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions