Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PHP Programming Exam Use the techniques you learned so far to create an Address Book application that stores names, e-mail addresses, and phone numbers in

PHP Programming Exam

Use the techniques you learned so far to create an Address Book application that stores names, e-mail addresses, and phone numbers in a text file. Validate all input fields and include functionality that allows the user to view the address book. Also, include code that sorts the address book by name and deletes duplicate entries. Each page in the application should have a link back to the main page. Be creative and add extra features if you want but make sure the minimum requirements are complete first. Grading - 50 Points Complete - The application works and performs as expected. No run time errors. 30 Points Style - good convention, programming style, readability. Include appropriate comments in the code. 5 points Validation - check for missing and malformed data. 10 points Documentation - List and describe the features of the application. Imagine them being on the outside of a product box. They can be in bullet form. 5 points.

Additional information:

First of all, HTML should be well-formed with appropiate attributes like title. Here is a short guide that you should follow. http://www.w3schools.com/html/html5_syntax.asp Here are some points on PHP Coding Style that will be enforced in homework and projects. - Indentation (tabs) should be 4 spaces. - Be consistant with variable names. You can use camel case or _ to delimit words, but don't switch. I use camel case. $CamelCase $under_score - Variable names should be descriptive. For instance, use $FirstPlayer instead of $fp. - Constant names should be UPPERCASE, with an UNDER_SCORE between words. - Braces should line up vertically: while (someCondition) { // body } - This should be applied to any structure that requires braces, including nested structures: if (condition1) { ... while (condition2) { // body1 } } else { if (conditon3) { // body 2 } } - Every function should have a comment explaining what it does - Keep functions to about 30 lines at most. This rule forces you to break up long functions into smaller, more succince functions. - A comment explaining the purpose of a script should be in a standard format. Here is an example /** Script to manipulate widgets. Solves homework assignment #3 @author Harry Hacker @version 1.01 2015-02-15 */ - Include a document block before every function, indicating the purpose and describing the parameters. Fro example: /** * Calls var_dump for a variable wrapped in 
 * @param $Var - variable to be displayed * @param $Name - name of the variable * @return void * @author Mick Jagger */ function myVarDump($Var, $Name) - Leave a blank line after every function - Define each variable just before it is used for the first time - Do not define two variables on the same line: $dimes = 0; $nickels = 0; // not good style - Use blank lines to separate parts of a method that are logically distinct. - If a statement takes more than one line, add an indentation level for the continuation - Comments should be used to indicate what the code is doing. 

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

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions

Question

1. Why did this situation come about?

Answered: 1 week ago