CIS 115 Test 1
REQUIREMENTS:
Test 1 consists of three code exercises, all associated with an application that reimburses employees for mileage and other travel costs. The Test1.zip file contains the image and files that you need to complete these exercises. Unzip and move these files into your coursework/exam1 folder. Note that some files already contain code to save you time. When you are done, zip and submit your ENTIRE exam1 folder so that ALL your files will be submitted.
Start early so you have plenty of time to complete the test, and to send an email if you’re not sure of the requirements. If you’re not sure how to do something, move on so you can do as much as possible. This will help you maximize your points.
1. The mileage-home.html page will display an introductory page that includes an image, some paragraphs and a table, and links to two other pages (you will develop these in exercises 2 and 3). The mileage-home.html page should exactly match the screen shot that is provided at the end of this document. You need to add the necessary HTML tags to achieve this, and you need to add the necessary styles to the CSS file named mileage.css. The necessary HTML and styles are defined below, be sure that mileage-home.html refers to mileage.css.
Things you should know:
· To save you time, the mileage-home.html file already contains all the necessary text for the page, so you just need to add the HTML tags to format the page to include the image, display a level 1 heading, create the paragraphs, bold text, and the table, and include two links. Refer to the screen shot below. Note that the last paragraph displays in red and italic.
· The image is provided and named mileage.jpg. The alt attribute text should be “Mileage Image”. You don’t need to use a table to align the image.
· For your mileage.css file, the H1 style should be Arial or Helvetica, or Sans-serif, blue, 24 pt, and bold. The paragraph style is Arial or Helvetica, or Sans-serif, black, 10 pt, and normal. The strong style is blue and bold. The special “alert” paragraph should be red and italic. The table is Arial or Helvetica, or Sans-serif, blue and 10 pt.
· The table with the reimbursement amounts should have a border of 1.
· The first link should go to convert.html, the second to mileage-form.html.
Hints:
· Everything for exercise 1 is covered in Chapter 4.
· Don’t worry if your paragraphs don’t wrap the same way as the screenshot, this will depend on the size of your Web browser’s window.
2. The convert.html and convert.php application allows the user to submit a number of kilometers, converts this to miles, and displays the result, rounded up to the nearest mile. To convert, multiply the number of kilometers by 0.621371.
Things you should know:
· The screenshots at the end of this document show how these two pages should display. Use the numbers shown in the screenshots to test your work.
· You will need a form for convert.html that will submit to convert.php.
· The input box in convert.html must include a name for the input value.
· In convert.php you will need to use a PHP function that will always round UP the result to the nearest mile.
· Test your work by running the server and using the localhost URL.
Hints:
· Everything you need for convert.html is covered in Chapter 4. Everything for convert.php can be found in Chapter 5.
· Always check your form names, variable names, and function names if you get errors or an incorrect result. Consider missing semi-colons. Appendix D in the textbook might help you to debug your HTML or PHP code.
3. The mileage-form.html and mileage-form.php application allows the user to submit five inputs: the month, number of travel days, number of miles, number of lunch days, and number of overnights. The mileage-form.html code is already coded for you, but the code provides an input box for the user to enter the month. Change this so that the user can select the month from a drop down list of months instead (see the screenshot below). The mileage-form.php code should: receive the five user inputs from the form; calculate the mileage payment, lunch payment, and overnight payment; calculate the total payment, and display the results so that the currency values are displayed to two decimal places. Read the text that was provided in mileage-home.html (exercise 1) to see how to calculate the mileage payment, lunch payment, and overnight payment.
Things you should know:
· mileage-form.html is provided in full, but you must modify it so that the user can select a month from a drop down list instead of typing the month into an input box.
· The table to output the results in mileage-form-php is provided but you will need to modify this slightly so the currency values ($mileagePayment, $lunchPayment, $overnightPayment, and $total) are all displayed to two decimal places.
· Note the variable names that are used in the input form and in the output table; you will need to use these same variable names in your own code.
· Test your work by running the server and using the localhost URL.
Hints:
· Everything you need for mileage-form.html is covered in Chapter 4. Everything for mileage-form.php can be found in Chapter 5.
· If you’re not sure how to create a drop down list for the month, skip this so you can focus on the other requirements, use the existing form instead.
· If you’re not sure how to display the currency values to two places, skip this so you can focus on the other requirements. The existing print statement lines will still show your results, they just won’t be formatted to two places.
· Be sure the variable names used in your code match the names in the form and the names used in the print statements.
· Use the numbers in the screen shots below to test your results.
GRADING (out of 25 points)
mileage-home.html:
Include image: 1
Correct link to CSS 1
Correct CSS, including strong and alert 3
Correct HTML tags to match format 2
Correct use of table 1
Correct links 2
convert.html:
Correctly send the kilometers to convert.php 1
Correct useof <input> tag and name 1
convert.php
Correctly receive value from form 1
Correct calculation 1
Correct use of function to round up the result 2
Correct display of result 1
mileage-form.html:
Change the month to a drop down 2
mileage-form.php:
Correctly receive values 2
Correct calculations 2
Correct use of function to format currency values round to two places 2
Note that up to 5 points may also be deducted for missing student name, incorrect syntax, misspellings, or other errors.
See next two pages for screen shots.
Use the sample input to test your work.
SCREEN SHOTS
Review the screen shots carefully. All formatting and styles that appear in the screen shots should also appear in your own applications. Your paragraphs may wrap differently depending on the size of your browser window.

Screenshot for mileage-home.html


Screenshots for convert.html and convert.php


Screenshots for mileage-form.html and mileage-form.php

Here is mileage-form.html again, this time showing the drop down list for the month
Why Work with Us
Top Quality and Well-Researched Papers
We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.
Professional and Experienced Academic Writers
We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.
Free Unlimited Revisions
If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.
Prompt Delivery and 100% Money-Back-Guarantee
All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.
Original & Confidential
We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.
24/7 Customer Support
Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.
Our Services
No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.
Essays
No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.
Admissions
Admission Essays & Business Writing Help
An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.
Reviews
Editing Support
Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.
Reviews
Revision Support
If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.