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

  The given code is meant to find out the largest item of a

the following code is meant to find the largest item of a list but the lines are out of order. the following code is

  Discuss why web services are important to web development

Discuss why Web services are important to Web development - find a Web service that you find interesting. Summarize and present it to the class

  Write program using array to show fifo queue

Write program using any language which uses the array to demonstrate simple FIFO queue with 10 job entering the queue and 5 jobs removed from the queue by the server.

  Problem on java programming

I have a text file located in the same folder with some various numbers, and it won't work. Thanks in advance.

  Find out the total of balances

Display all the contents of the file in a tabular format with the first row being a header row and write to a file that is called account numbers.txt only the account numbers from the read file.

  Explain the importance of usability when designing a website

Explain the importance of usability when designing a website and develop a set of recommendations for website usability

  Important factors in the design of your application

What do you think will be the most important factors in the design of your application and what are the most important principles that you want to include in the design of your application?

  Write program to calculate cost of flowers sold at stand

Write down the program in class FlowerCounter which calculates the cost of flowers sold at flower stand. Five types of flowers-petunia, pansy, rose, violet, and camation- are stocked and cost.

  Create a windows application and design document

create a complete C# Windows application and design documents based on the following specifications and instructions.

  Write down a custom error handling javascript function

write a custom error handling javascript function called processerrors that handles a custom error by assigning it to

  Program that calculates and displays the amount of money

Create the logic for a program that calculates and displays the amount of money you would have if you invested $3000 at 2.65 percent interest for one year

  Write down a program that will predict the size of a

write a program that will predict the size of a population of organisms. the program should ask for the starting number

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