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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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