Display a random joke and a random quote

Assignment Help Computer Engineering
Reference no: EM132153445

You need to practive how to use PHP to implement a dynamic webpage.

Your webpage should display a random joke and a random quote. Furthermore, each time the page is visited, your script should randomly pick up a different joke and a different quote, which should vary based on the current date or the date provided through query string.

If the current date happens to be a national holiday, you should display a joke related to that holiday in red color, and the quote in green color, also relevant to that holiday. The theme of the joke and quote has to be relevant to the holiday.

Choose at least FIVE national holidays. As you know some holidays have dates varing from year to year.

For example, Christmas day is a holiday with fixed date, but easter day is NOT. To simplify your life, let us choose only those holidays with fixed dates.

Which 5? You pick! If the current date is nothing special, you should display a joke randomly and a quote randomly. Certainly you should prepare pools of data to pick.

For now, you can hard code 10 jokes and 10 quotes inside your script, using array data structures for regular days, hard code 2 jokes and 2 quotes for each holiday.

For each joke, you need to provide a link for where you get the joke. For each quote, you need to provide the people to whom the quote should be attributed.

test your program for different dates, you have to either wait until those special days coming or reset server's system date to those different special holiday dates in order to test the result, but usually we cannot wait for each special day to come. So that is not a good way to test your solution.

Therefore you should also page should also be able to extract date information ( year, month, day) provided through query string, so that, user can test your page by manually providing different dates through query string without resetting server's time.

Here are some hints for doing this.

Use randomize to initialize the seed of the pseudo random generator, before you use rnd function, use randomize in a single line.

Use if else and array data structures

In the case of regular days, use 4 arrays of the same size, 1 array for jokes, 1 array for the urls of the jokes, 1 array for quotes, 1 array for the authors of quotes

In the case for special holidays, you can consider to fix data or use a set of separate data structures. the same index, randomly picked, controls the joke, url of the joke, quote, the author of the quote

Reference no: EM132153445

Questions Cloud

Inverse demand curve : Where P is the price of output and Q is the number of outputs sold per hour. This firm is the only employer in town and faces an hourly supply of labor given by
How would we be harmed if an employee of our cloud provider : How would we be harmed if an employee of our cloud provider accessed the asset?
Ask the user how many grades they have : You need to check to make sure the grades are within the normal range. If the grade is less than 0 or more than 100, issue a warning to the user.
Healthcare or the providers of healthcare : Pick a side, the payors of , and defend their position for the payment of healthcare services. This is regarding Healthcare.healthcare or the providers of healt
Display a random joke and a random quote : Use randomize to initialize the seed of the pseudo random generator, before you use rnd function, use randomize in a single line.
Direct part of the federal government : Why was it made an independent quasi-governmental body and not a direct part of the federal government?
What is the firm capital-labor ratio : A firm's production function is X = 6LK. Name five input combinations that would allow the firm to produce 180 units of output.
What mindset does an analyst need to work on : Could this be done differently, such as through JAD sessions or having the users review the program on a weekly basis.
Would you say that the internet fosters or impedes social : Would you say that the Internet fosters or impedes social activity? Explain your position. Does the internet help or impedes social activity on the internet?

Reviews

Write a Review

Computer Engineering Questions & Answers

  How to create two arrays of integers

create two arrays of integers, each holding ten elements of data. Create a third array of integers for a result array. Your main program will take the two arrays of integers and pass them to the function subtract().

  In privacy deborah g johnson presents arguments designed to

in privacy deborah g. johnson presents arguments designed to show that the greater capacity of computers to gather and

  Shows how the it and biblical concepts are related

Create a document which shows how the IT and Biblical concepts are related. (What are the similarities between these ideas?)

  Prepare the logic for a program that continuously prompts

Prepare the logic for a program that continuously prompts the user for two numeric values that represent the sides of a rectangle.

  Write an sattributed syntax directed translation for boolean

Implement a lexical analyzer (use Lex or write it by hand) and a recursive-descent translator based on the above translation.

  The priority of the interrupts ranges from irq6 as the

given the following set of events show which routines the cpu is executing for times 0 to 100 ns.nbsp each handler

  Discuss the specific governance plan

Search the Internet for IT governance planning. Select a specific governance plan that exists at a company or a plan framework from an organization.

  How does the use of interrupts increase the efficiency

How does the use of interrupts increase the efficiency of a computer while executing programs.

  Evaluate the total with insurance

Enter the insurance rate as a mixed cell reference in the formula, making the row number absolute.

  Distinguish between static and dynamic dataflow computers

Distinguish between static and dynamic dataflow computers. Draw a dataflow graph showing the computations of the roots of a sequence of quadratic equations Ax?

  Why the problem is interesting

Write an 8-page APA formatted paper on a business problem that requires data mining, why the problem is interesting, the general approach you plan to take.

  Describe the output for sequence of queue operations

Describe the output for the following sequence of queue operations: enqueue(5), enqueue(3), dequeue(), enqueue(2), enqueue(8), dequeue(), dequeue(), enqueue(9).

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