Solved

PHP Code Design questions

Posted on 2011-02-27
3
288 Views
Last Modified: 2013-11-13
Hi Experts,
Please provide code for following question.
----------------------------------------------------------------------------------------------------------------------------------------------------------------
ABC Buses has recently taken delivery of a fleet of 50 buses and has decided to create an automated timetabling system to replace the manual one they have now.

Requirements
•      Staff need to be able to create/update/delete: buses, bus stops and routes.
•      Each bus entered has a number.
•      Each bus stop has a name e.g. ‘Federation Sq.’
•      Each route has a bus with a departing time+stop and an arrival time+stop (time must be in 24hr format) eg Bus 1 leaves Stop ‘Federation Sq’ at 14:00 and arrives at Stop ‘Flinders Station at 16:00’.
•      Staff need to be able to see a printout of all routes in this format
•      DEPART_STOP ARRIVAL_STOP  BUS_NUMBER START_TIME END_TIME TIME


Staff would also like the facility to calculate the shortest route between 2 stops by entering a depart stop+time and an arrival stop; and receive a print out like such

Starting at stop DEPARTING_STOP
Take HH:MM Bus Y to stop Z
Take HH:MM Bus A to stop B
Arrive at stop ARRIVAL_STOP at HH:MM

Note: There is the possibility that no route is possible.
----------------------------------------------------------------------------------------------------------------------------------------------------------------

BR Dushan
0
Comment
Question by:Dushan De Silva
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Expert Comment

by:AnilKumarSharma
ID: 34994498
Dushan911 , What I think you are requesting a full application (as you asked Please provide code ) rather then PHP code design (as given in question heading). We can help you in any technical area or problem you are struggling to find a solution. It is very uncommon to write a whole new application. Expert are here for helping you and not working full time to make some application on request. That is why it is a question answer type session/forum rather then request a application-code and application-code selected forum.
0
 
LVL 17

Author Comment

by:Dushan De Silva
ID: 34994519
I'm sorry about that, could you kindly give me an idea, how can I start (design) , writing to a text file(like with arrays) or database approach.
0
 
LVL 34

Accepted Solution

by:
Beverley Portlock earned 500 total points
ID: 34997035
Use databases. For any serious level of data storage, using text files is silly.

Design the database FIRST then code the PHP.

When designing the dtaabase ensure that you make your tables conform to 1st, 2nd and 3rd Normal Form ( http://en.wikipedia.org/wiki/Database_normalization#Normal_forms ). If you don't do this then you may as well not bother developing the code at all. Normal forms are incredibily important at promoting production of good code.

Once you have the database designed then identify the functions your system needs to provide and these will provide the coding units needed to access the database. So setting a route may involve one or more depots, a bus, a calendar, and so forth but a route needs creating, updating and deleting so create a route class that can do those things using the relevant tables.

Finally write the main application code to glue your classes together with HTML and CSS.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
Simple Linear Regression
Six Sigma Control Plans

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question