Question: Please help with my assignment of codes! [HTML & PHP] Working with Numbers Create a calculator to compute the cost of college courses at Long
Please help with my assignment of codes! [HTML & PHP] Working with Numbers
Create a calculator to compute the cost of college courses at Long Beach City College.
The calculator should have the following options:
Cost of Tuition Number of Units (1 - 21 select box) Calculate tuition at: $46 per unit for residents $331 per unit for non-residents and international students (You will need to determine whether they are non-resident or resident before making your calculations - do not show the unit fees anywhere on the form)
Mandatory Fees: Student Health Fee $20 for each student who registers for any classes
Optional Fees: College Services card $20.00 Parking Permit: $30.00
Scholarship Guidelines: When calculating the cost of tuition, generate a random award scholarship in the range of $0 to the cost of the student's tuition and subtract the award from the cost of tuition. Do not let the total tuition go into negative values.
Output the student's balance due, specifically showing how the balance was created. Here is an example of some sample output (The red values indicate form field values, the blue values indicate program computed/generated values).
Cost of Tuition: 5 units x $46 = $230
Student Health Fee: $20
College Services card: $20
Parking Permit: $0
Total Registration Costs: $269
Scholarship Award: $100 Total College Balance Due: $169
Tips
Feel free to style the form and the output how you see best! Also, don't over complicate this assignment. Use select boxes for things such as College Services Card (Yes/No) and set the values of Yes = 20 and No = 0. You can also do the same thing with Resident/Non-Resident and put the value of the cost per credit hour in the resident and non-resident values on the form inputs.
Create a random value by using the rand() function like so but change the values to meet the requirements of the assignment:
$myscholarship = rand(1000, 10000);
Assets
We recommend including some LBCC branding in this calculator. You can grab an image from this Google search (Links to an external site.).
Debugging Suggestions:
After you submit the form, you can check to see what the data is coming over by outputing the entire $_POST array using this line of code:
echo "
"; print_r($_POST) ; echo "
";
Another tip is to use echo to print out your variables to check them as you are manipulating them.
echo "units = $units";
Then comment or remove these debugging lines of code before submitting your assignment.
Submitting your Work:
Create your files on REPL and save it as tuition_calculator.html (HTML5 form) and process_tuition.php. Be sure to name your REPL Homework 3. Provide the link to your REPL in the submission comment.
![Please help with my assignment of codes! [HTML & PHP] Working with](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f45e9616dcc_02966f45e95ae013.jpg)
Example of Prior Student's Work
Graded Elements: Worth 30 points
| HTML Form - are all form elements properly coded, all required elements indicated, is the HTML document structure correct? | 10 pts |
| PHP Output - Are all fields correctly outputting on the process_tuition.php page? Do the calculations add up? | 15 pts |
| Make it look pretty (CSS), good user experience and correct file naming. | 5 pts |
B 14 LONG BEACH CITY COLLEGE LBCC Tuition Calculator Fill out this form to calculate the total cost of tuition: Are you a resident of the state of California? Resident Number of Units: 1 There is a mandatory Student Health Fee of $19 for all registered students Optional fees: College Services Card: No [50] Parking Permit: No [50] Submit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
