Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Assignment must be written in PHP Use notepad++ or any text editor copy and paste the help file given after the instructions. Save the

The Assignment must be written in PHP

  1. Use notepad++ or any text editor copy and paste the help file given after the instructions.
  2. Save the file as FinalProject with your Student ID. For Example if your Student ID is 029876. Then your file name will FinalProject029876.php
  3. This file name will also be displayed as comments in the file. Use the file given after the instructions to start your Final Project. Create functions for each four choices.
  4. Choice 1 will be for function that will compute Area of a Circle, using PI() and Pow() and Round() to display the output as:

Area of Circle with a radius of _____ is = ____

  1. Choice 2 will be for function that will compute Gross Pay, Federal Tax, State Tax and Net Pay. Use the If option to compute overtime pay at the rate of 1.5 times the regular pay for hours over base-hours (base_hours = 40), otherwise compute regular pay as hours * payRate. Company deducts Federal Tax at 12% of Gross Pay and 7% for State Tax. Display the output (rounded to two decimals) as:

Hours worked: ____ Overtime Hours:____ Over Time Pay:$ ____Pay Rate: $_____

Gross Pay $ _______Federal Tax $: _____ State Tax $:_____ Net Pay $: ______

  1. Choice 3 will be for function that computes Total Sale using the following criteria:

A software company sells a package that retails for $99. Quantity discounts are given according to the following table:

Quantity Discount

10 19 20%

20 49 30%

50 99 40%

100 or more 50%

Design a function that uses a predefined quantity for the number of packages ordered, then compute the discount price, Total Sale amount using the discount price and the quantity ordered.

Display the output as given below:

You ordered ___ Allowed Discount ___ %

Retail Price $99 Discount Price$ ____ Total Sale Amount $ ____

Thanks for your Order.

  1. Choice 4 will be for the function that computes Interest on a Bank Loan. The customer has to prequalify for the Auto Loan by meetingboththe following requirements:
    1. Annual Income should be more than 29999 and
    2. Years On Job > 2 years

To determine the eligibility use an If-Else logic. Display Congratulation You Qualify for the Auto Loan and then use the formula to compute the Simple Interest on a Auto Loan of 22000 at 4.5% Annual Interest for 5 years. To compute the Total Interest on Auto Loan use the formula--- Principal * Interest_rate /100 * Years. You have to divide the Total Interest by the number of years of the loan to get the Annual Interest. You will also compute the total payment made to the bank including total interest. Display the following:

Loan Amount $ ______ Annual Interest $________ Loan Pay Off in ____ years

Total Interest on Loan $ ______ Total Amount paid $ _______

If the output of the boolen logic is false then display the following message:

Sorry You do not Qualify for the Auto Loan.

  1. Display as line 1 in your output using font size and color option (any color of your choice) the textYork Technical College.
  2. Line 2 CPT 238 Internet Scripting Final Project Spring 2020.

So far I have this code

$choice=1; switch ($choice) { case 1: { computeA();//pass a parameter value(s) break; } case 2: { computeB();//pass a parameter value(s) break; } default: { echo " Invalid choice"; break; } } function computeA() { echo "Compute and display values from function computeA()"; } function computeB() { echo "Compute and display values from function computeB()"; }

?>

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

App Inventor

Authors: David Wolber, Hal Abelson

1st Edition

1449397484, 9781449397487

More Books

Students also viewed these Programming questions

Question

Find the sum of the convergent series. n=1 1 (2n + 1)(2n + 3)

Answered: 1 week ago