Project 1 Part A

Due Wednesday, 10/15/2014 by 11:00pm

Change history

Partners

The CS143 project may be completed individually or in teams of two, the choice is up to each student. Partnership rules consist of the following:

Please make sure to submit your work jointly - do not turn your project in twice, once for each partner.

Scope

The primary purpose of this first "PHP warm-up" part is for us to provide you with a whole bunch of basic information, and to get everyone up-to-speed on our computing systems and the languages and tools we will be using. Those of you who have done some Web programming before, especially in PHP, may find this project part nearly trivial. Those of you who haven't will find it merely straightforward. With all that said, please don't start at the last minute -- as with all programming and systems work, everything takes a bit of time, and unforeseen snafus do crop up.

System Setup

We will be using VirtualBox to run the Linux operating system in a virtual machine. VirtualBox allows a single machine to share resources and run multiple operating systems simultaneously. Read our VirtualBox setup instruction (Windows) (Mac) and follow the instructions to install VirtualBox and our virtual-machine image on your own machine. (Particularly, if you are a mac user and see an "vboxnet0" error, please make sure you follow our mac instruction above step by step.)

The provided virtual machine image is based on Ubuntu 7.10, MySQL 5.0.45, Apache 2.2.4, and PHP 5.2.3. You will need to use the provided VirtualBox guest OS to develop and test all projects for this class. Your VirtualBox guest is essentially a Linux machine, which is a variant of Unix. If you are not familiar with Unix, now is the time to read the Unix Tutorial for Beginners to learn the basic Unix commands.

PHP Web Calculator

In this part of the project you will familiarize yourself with Apache2/PHP by building a small Web calculator application in PHP.

Throughly test your code and make sure that it meets the above minimum requirements and runs correctly on our virtual machine. Note that this part of the project will be graded based on the functionality not on the look or style. As long as you meet the minimum requirements, you will get full credit for this project.

Late Submission Policy

To accommodate the emergencies that students may encounter, each team has 4-day grace period for late submission. The grace period can be used for any part of the project in the unit of one day. For example, a student may use 1-day grace period for Project 1A and 2-day grace period for Project 2B. Any single project part may not be more than 2 days late. Note that even if a team submits a project 12 hours late, they would need to use a full day grace period to avoid late penalty. If your project is submitted late, we will automatically use the available days in your grace period unless you specifically mention otherwise in the README file.

What to Submit

Please submit the following files electronically:

Grading is a difficult and time-consuming process, and file naming and packaging convention is very important to test your submission without any error. You MUST test your submission in our VM before your final submission to minimize the chance of an unexpected error during grading. Significant points may be deducted if the grader encounters an error during grading.

Visit the Project 1A submission page to submit electronically by the deadline. In order to accomodate the last minite snafu during submission, you will have 30-minute window after the deadline to finish your submission process. That is, as long as you start your submission before the deadline and complete within 30 minutes after the deadline, we won't deduct your grade period without any penalty.

FAQ

  1. Q: Does the calculator need to handle negative/positive numbers?

    A: We will not use any positive sign before a number, but a negative sign needs to be supported. For example, we may test expressions like "3*-2" or "-2/-3" or "1+-1".

  2. Q: how should we treat the fractional number: for example: would we treat ".123" as "0.123" or treat it as an invalid expression?

    A: All fractional numbers will have a leading zero in our test, but you are welcome to handle .123

  3. Q: may TAs give us some testing cases to help us to get a 100% score?