Write a perl cgi program

Assignment Help Programming Languages
Reference no: EM13905340

Download and install MySQL, Perl and its relevant modules, and a webserver on your machine if they are not available on your system.

The software and relevant installation instructions are available at Canvas (Online Learning Tool) site https://canvas.umd.umich.edu/.

Assume that the following table:

quiz1 tst ( qnumber INTEGER,

question VARCHAR(80),

answer VARCHAR(20),

choice1 VARCHAR(20),

choice2 VARCHAR(20),

choice3 VARCHAR(20),

choice4 VARCHAR(20),

choice5 VARCHAR(20) )

is created on the MySQL database server and is used to keep questions in a quiz.

Assume that the database name is cmp265db, the user id is cmp265, and password is cmp265pwd.

Write a Perl CGI program (script) to insert new questions into the quiz table via a Web browser. You can assume that, when inserting questions into the table, there is only one transaction yielded by your program to access the table (i.e., no need to consider concurrency control issues).

Some detailed requirements are given as follows:

• The question number (‘qnumber') of a new question must be numbered in a consecutive order with the existing questions (if any) in the table. For example, if the current table has 3 questions, your next new question should be numbered as the 4th one.

• Each session can insert multiple questions into the table. You need to display how many questions exist in the table and how many new questions you have inserted for the current session on the browser.

• Keep your state data in a state table (with a table name states xxx, where xxx is your last name using all lower-case letters) managed by the MySQL database server.

• Keep the names of your quiz table and state table in two global variables so that they can be easily changed when the program is tested for tables with other names if necessary.

• Make sure your program performs sufficient error checking.

• Put sufficient comments in the program so that it is easy to understand.

• Print the screen snapshots of several sessions, and print the contents of your quiz table and state table after each session.

• Print the screen snapshots of a quiz session using the quiz CGI program quiz3 tst.pl (which can be downloaded from Canvas) for the quiz table with your newly-inserted questions (after one insertion session). Note that quiz3 tst.pl is the same as quiz3.pl that we discussed in the class except that the name of the quiz table has been changed to quiz1 tst that is used by your quiz inserting program.

• Write a description document about your program, including its transaction diagram.

Attachment:- example_scripts.rar

Reference no: EM13905340

Questions Cloud

What would likely have result of eliminating withholding : Compare the federal income tax to sales taxes using the "certainty" criterion. What criterion for evaluating tax systems did this proposal violate? What would likely have been the result of eliminating withholding?
What is difference between horizontal and vertical equity : What is the difference between horizontal and vertical equity? How do tax preferences affect people's view of horizontal equity?
What is difference between income and substitution effects : What is the difference between the income and substitution effects? For which types of taxpayers is the income effect more likely descriptive? For which types of taxpayers is the substitution effect more likely descriptive?
What type of forecasting is kobe likely using : Kobe strongly dislikes SUVs and is appalled that so many are on the road. What is wrong with Kobe's proposal? What type of forecasting is Kobe likely using?
Write a perl cgi program : Write a Perl CGI program (script) to insert new questions into the quiz table via a Web browser. You can assume that, when inserting questions into the table, there is only one transaction yielded by your program to access the table
Received balance due from laird corp : Prepare journal entries to record the following merchandising transactions of Sheng Company, which applies the perpetual inventory system.
What different types of federal and state taxes may affect : Benjamin recently bought a truck in Alabama for his business in Georgia. What different types of federal and state taxes may affect this transaction?
What is the difference between a sales tax and a use tax : What is the difference between a sales tax and a use tax? What is an ad valorem tax? Name an example of this type of tax. What are the differences between an explicit and an implicit tax?
What is the nature of the effects of the factors : Use the date in table above and answer the following questions in the space provided below: What is the nature of the effects of the factors studied in this experiment? What strategy would you use to reduce invoice errors, given the results of t..

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd