Using the OO Design Principles, write an HTMLTable class with uses CGI programin
ID: 3753697 • Letter: U
Question
Using the OO Design Principles, write an HTMLTable class with uses CGI programing
This table class will have methods that allow the user to place strings in a table (2D array of strings) that is stored in the object and print out the table in HTML format.
This program can't have any user input, all the table cells are created in main()
Requirements
-a 3 x 3 table with your name in the middle and colors in the other 8 cells. (By color I mean words like "red" and "blue")
-a 2 rows x 8 column table with chess piece names in the appropriate places with borders
rook
knight
bishop
king
queen
bishop
knight
rook
pawn
pawn
pawn
pawn
pawn
pawn
pawn
pawn
-a 2 x 2 table where HTML image tags are placed inside the table. The files will need to be on the server in the same directory as the program. <img src="<em>image.jpg</em>" />
rook
knight
bishop
king
queen
bishop
knight
rook
pawn
pawn
pawn
pawn
pawn
pawn
pawn
pawn
Explanation / Answer
xxxx'x the xxxxxxxx xx xxxxxxxxx.x :
#xxxxxxx
#xxxxxxx xxxxx namespace xxx;
class xxxxxxxxx { vector< xxxx > xxxx; xxxxxx: void xxx_xxxx(xxxxxx name, xxxxxx xxxxxxx) { data.push_back( xxxx_xxxx(xxxx,xxxxxxx) ); }
void xxxx_xxxx() { xxxx << "" << xxxx; for(vector< xxxx >::xxxxxxxx x = xxxx.xxxxx(); i != xxxx.xxx(); x++) {
xxxx << "";
xxxx << "" << (*i).first << "" << (*i).second << "";
cout << "";
} cout << "" << endl;
}
xxxx xxxx_xxxx() {
xxxx << "" << endl;
xxxx << "" << xxxx; cout << "" << endl;
xxxx << "" << xxxx; cout << "" << endl;
}
}; xxx xxxx driver xxxx:
#include #xxxxxxx
#include "xxxxxxxxx.x"
int xxxx() { xxxxxxxxx *t = new xxxxxxxxx(); // xxxxxxxxxxx variables xxx be xxxx xxxx xxx is xxxxxx from xxx xORM. xxxx * xxxx = xxxxxx("xxxx"); xxxx * address = getenv("address");
xx(xxxx || xxxxxxx) {
if (xxxx) xxxx << "xxxx=" << xxxx << (xxxxxxx ? "&":""); if (xxxxxxx) xxxx << "xxxxxxx=" << xxxxxxx; } xxxx {
x->xxxx_xxxx(); // xxxxxxxxx xxxx xx form xx submitted.
} xxxxxx x; }
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.