.NODE

Internet and Web Resources

Answers to Self Review Exercises

19.1

a) get and post. b) cache. c) middle. d) machine name. e) XHTML. f) QUERY_STRING. g) form.

19.2

a) True. b) True. c) False. The middle tier implements business logic to control interactions between application clients and application data. d) False. A dynamic Web page is a Web page that is created programmatically. e) False. The pairs are joined with an ampersand (&). f) False. XHTML documents are more efficient than CGI scripts, because they do not need to be executed on the server side before they are output to the client. g) True.

Exercises

19.3

Define the following terms:

  1. HTTP.
  2. Multitier application.
  3. Request method.
19.4

Explain the difference between the get request type and the post request type. When is it ideal to use the post request type?

19.5

Write a CGI script that prints the squares of the integers from 1 to 10 on separate lines.

19.6

Write a CGI script that receives as input three numbers from the client and displays a statement indicating whether the three numbers could represent an equilateral triangle (all three sides are the same length), an isosceles triangle (two sides are the same length) or a right triangle (the square of one side is equal to the sum of the squares of the other two sides).

19.7

Write a soothsayer script that allows the user to submit a question. When the question is submitted, the script should choose a random response from a list of answers (such as "It could be", "Probably not", "Definitely", "Not looking too good" and "Yes") and display the answer to the client.

19.8

Modify the program of Figs. 19.1319.14 to incorporate the opening XHTML form and the processing of the data into a single CGI script (i.e., combine the XHTML of Fig. 19.13 into the CGI script of Fig. 19.14). When the CGI script is requested initially, the form should be displayed. When the form is submitted, the CGI script should display the result.

19.9

Modify the viewcart.cgi script (Fig. 19.23) to enable users to remove some items from the shopping cart.

Introduction to Computers, the Internet and World Wide Web

Introduction to C++ Programming

Introduction to Classes and Objects

Control Statements: Part 1

Control Statements: Part 2

Functions and an Introduction to Recursion

Arrays and Vectors

Pointers and Pointer-Based Strings

Classes: A Deeper Look, Part 1

Classes: A Deeper Look, Part 2

Operator Overloading; String and Array Objects

Object-Oriented Programming: Inheritance

Object-Oriented Programming: Polymorphism

Templates

Stream Input/Output

Exception Handling

File Processing

Class string and String Stream Processing

Web Programming

Searching and Sorting

Data Structures

Bits, Characters, C-Strings and structs

Standard Template Library (STL)

Other Topics

Appendix A. Operator Precedence and Associativity Chart

Appendix B. ASCII Character Set

Appendix C. Fundamental Types

Appendix D. Number Systems

Appendix E. C Legacy Code Topics

Appendix F. Preprocessor

Appendix G. ATM Case Study Code

Appendix H. UML 2: Additional Diagram Types

Appendix I. C++ Internet and Web Resources

Appendix J. Introduction to XHTML

Appendix K. XHTML Special Characters

Appendix L. Using the Visual Studio .NET Debugger

Appendix M. Using the GNU C++ Debugger

Bibliography

show all menu





C++ How to Program
C++ How to Program (5th Edition)
ISBN: 0131857576
EAN: 2147483647
Year: 2004
Pages: 627
Similar book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net