Write a cgi script that will parse a program

Assignment Help C/C++ Programming
Reference no: EM131048316

Sorting and Running Time

Merge Sort

We're going to show that Merge Sort has an O(n lg n) running time by timing the code on the computer.

You need a running version of Merge Sort. Feel free to use the version with the videos or one that was done in class.

- cp ~kurban/public_html/permanent/cpp-examples/mergeSort/* . (for the video one)
- cp ~kurban/public_html/csc125/ (for the live class, the name may vary)

What to do
To time an individual run, create a linked list of some number (say 1,000,000) random elements, and run the code with and look at endTime - startTime. This is one datapoint.

Write a program that will:
- generate at least 200 different data points of various sizes.
- Those points will be written to a 'csv' file. Comma separated value files are text files that can be read into a spreadsheet directly.
- This code should run for HOURS
- You can run it on any machine you want

Overview of the program for loop (at least 200 times)

- Pick a number of items to sort, perhaps based on the outer loop and a random number, lets call it n
- for loop (n times)
? create random number and insert into linked list using ll.insert()
- end while
- start timer
- ll.mergesort()
- end timer
- append n and elapsed time to a data file

end for loop

Tree Parser

Write a c++ cgi script that will parse a program that's passed into it and act of the results. The program is a new, simple language it made up that works with a single queue.

Doodle Bugs Start

Look at the doodlebug problem in the text book:
- Page 888-9 from text. Ex 9 (9th ed)
- Page 863-4 Ex 11 (8th ed)

Rather than just use a console for the interface, lets build a web app that will do it. (Obviously there are better technologies for this!)

This web app just creates a world, it doesn't run the simulation. There's no eating or starving or breeding in this lab.

- I have put the interface together, your job is to add some new classes to the entire program:
- My code is at h ttp://www.csit.parkland.edu/~kurban/permanent/cpp-
e xamples/doodleStart/

on linux, use

cp ~kurban/public_html/permanent/cpp-examples/doodleStart/* .

pond object has a blue water-like image

- You will need to create the class and put in the proper virtual functions required by Organism
- You will need to add a public method to the World constructor called makePond() and call it from the constructor
- The makePond() method will be called from the world constructor after fillBorder() and will make a continuous pond.
- Either it can be rectangular. (Choose two rows and two columns and fill in between them)
- Or it can be round. (Choose a center and a diameter, and points where the distance from the center is < radius is a pond)
- It must be random, so a reset will draw a new one.

A frog object has a colorful frog image (so it can be seen)

- You will need to create the class and put in the proper functions required by Organism
- You will need to add a public method to the world constructor called
makeFrog() and call it from the constructor
- The makeFrog() method will be called from the world constructor after fillDoodleBug() and will make frog with a 1 in 100 probability on an empty square.

- a link to your code in the message area.
- an image of the webpage with a pond and crickets.

Message : My instructor requires use the softwares: CodeBlocks, Putty and Wincp.

Almost codes the instructors given in his files( or link) , you need to change or adjust parts of codes to finish those labs.

We use codeblocks coding and use Linux(putty) to run on my web link

Attachment:- Labs.rar

Reference no: EM131048316

Questions Cloud

Observations per group does your analysis use : Comparisons among means for one factor in a two-way analysis. We have illustrated Tukey pairwise comparisons among all treatment means in both one-way and two-way settings. The method can also compare the mean responses to just one of the two fact..
Why are congresss approval rating so low : What is the point of congressional committees? why are some committiees more influtial then others?" "Why are congress's approval rating so low?"
Continue your analysis of the data from the previous : Girls' cross-country times: a contrast (optional). Continue your analysis of the data from the previous problem by comparing average race time during the first half of the season with the average for the second half.
Describe the major provisions that most constitution contain : Describe the major provisions that most constitutions contain. Response should in part or all be taken from this textbook in use: Dye, T.R. & MacManus, S.A. (2012). Politics in states and communities (14th ed.).
Write a cgi script that will parse a program : Show that Merge Sort has an O(n lg n) running time by timing the code on the computer - Overview of the program for loop
Using some of the seven criteria fraser identifies : Using SOME of the seven criteria Fraser identifies, explain why the model you have chosen is preferable to the other two. How well will your model meet the needs of low-income families and single mothers?
Herbicide and corn hybrids : Herbicide and corn hybrids. Genetic engineering has produced new corn hybrids that resist the effects of herbicides. This allows more effective control of weeds, because herbicides don't damage the corn.
Number of times each of three types of behavior : Hooded rats: object play counts. The researchers who conducted the study in the previous exercise also recorded the number of times each of three types of behavior (object play, locomotor play, and social play) occurred.
Stepped up and down for three minutes : Exercise and heart rate. A student project measured the increase in the heart rates of fellow students when they stepped up and down for three minutes to the beat of a metronome.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Mechanism to achieve secure key exchange

In 1976 Diffie and Hellman have suggested their famous protocol for key exchange based on number theory. More recently (around 2002) I. Kanter, W. Kinzel and E. Kanter [1] proposed to use neural networks synchronization by mutual learning as the m..

  Complete the leadership in action case study

Complete the Leadership in Action case study for Lehman Brothers on page 276-277 in your textbook.

  Prepare a program that prints the multiplication table

Prepare a program that prints the multiplication table for numbers 1 to 9. The program should include two nested loops and compute the products and print them

  Demonstrates steps to analyze the problem

Demonstrates your thought process and steps used to analyze the problem. Be sure to include the required input and output and how you will obtain the required output from the given input

  Calculate the trajectory of a soccer ball

Write a program to calculate the trajectory (flight path) of a soccer ball

  Write program which reads n numbers from keyboard

Write down C++ program which reads N numbers (positive, negative, integer and double numbers) from keyboard, computes and shows the following information. Largest number of all numbers entered from keyboard.

  Write specifications for a method

Write specifications for a method that advances any given date by one day. Include a statement of purpose, pre- and post-conditions, and a description of the parameters.

  Write a program that reads numbers

Write a C++ program that reads N positive numbers from the keyboard, calculates and shows the smallest number of all numbers

  Program that reads in the average monthly

Write a program that reads in the average monthly rainfall for a city for each month of the year and then reads in the actual monthly rainfall for each of the previous 12 months. The program then prints out a nicely formatted table showing the rainfa..

  Writing a program in c that meets the following criteria

Include comments within the code to explain each of the functional areas.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write a program that performs a simple n-body simulation

Write a program that performs a simple n-body simulation, called "Jumping Leprechauns." This simulation involves n leprechauns, numbered 1 to n.

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