Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How can i plug my code into this to make it work? Here's my code: body { background-image: url(coffee.jpg); background-color: #8B4513; } What is your

How can i plug my code into this to make it work? Here's my code:

What is your favorite Cofeee?

Espresso (Short Black)
Double Espresso (Doppio)
Long Black (Americano)
Long Macchiato.
Short Macchiato.

Results

(percents rounded)
Coffee Name Number Percent
None%
Espresso (Short Black).%
Double Espresso (Doppio).%
Long Black (Americano).%
Long Macchiato.%
Short Macchiato.%
Raw Data

Move the struct FIELDS and class WebApps to its own header file, named WebApps.h. We are going to leave the function definitions inline within the class, for simplicity-sake (though not ultimately recommended by industry)

Read more info on Header Files.

WebApps.h needs to live in the same directory as survey.cpp, so that it is available at compile time - we do not compile .h files manually.

WebApps.h should contain the same includes as survey.cpp, the ifndef/define/endif directives, as a regular header file does, the FIELDS struct, and the class, pretty much exactly as already working properly in retrieve_form_OOP_2.cpp.

Check out the FileApps.h

header file below as an example to follow for WebApps.h. All the main program needs now is an 'include' to the header file and should compile and run.

Create a temporary web_form_survey.html, based on the older web_form.html to test the program until it runs as before (in retrieve_form_OOP_2.cgi).

At this point, since this program is self referential, its first state is to serve the HTML form for the survey. From here, the current code in main should be replaced completely (might be good to just comment the whole thing and leave at the bottom of the program to reuse some of the code later) and start from the following skeleton (copy from this :

WebApps wo; void build_form(); int main() { const int cnt = wo.get_cnt(); if (cnt != 0) { cout << "debug with cnt != 0 " << endl; }else { build_form(); } return 0; } ////////////functions///////////// void build_form () { cout << "Survey Vote" << " " << "
" << " Will it be a Yes or a No? " << " " << " " << " " << "

" << "

" << "

" << " " << " "; }

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

More Books

Students also viewed these Databases questions

Question

What internet sources did you use to obtain this information?

Answered: 1 week ago

Question

Examine various types of executive compensation plans.

Answered: 1 week ago

Question

1. What is the meaning and definition of banks ?

Answered: 1 week ago

Question

2. What is the meaning and definition of Banking?

Answered: 1 week ago

Question

3.What are the Importance / Role of Bank in Business?

Answered: 1 week ago