Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question1) Using C++, Splashkit and Visual studio code answer the question. Example- string read_string(string prompt) { string result; write(prompt); result = read_line(); return result; }

Question1) Using C++, Splashkit and Visual studio code answer the question.

Example-

string read_string(string prompt)

{

string result;

write(prompt);

result = read_line();

return result;

}

a)How would a read_double code portion be to make sure it checks if the user has entered a valid number before doing the conversion so that it does not crash when an invalid value is entered?

b) How would a read_double_range code portion be to read a number between minimum and maximum (inclusive) values? For example, read a double between 0.0 and 1.0.

c) How would a read_boolean function code portion be to ask the function "yes/no" type questions? The user should be able to type "yes" or "y" (for true) and "no" or "n" for false. (This should not be case sensitive, and should work if there are leading or trailing spaces)?

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

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago