Proramming Exercise for school in OOP, please help!

Discussion in 'PHP' started by Jayson, May 27, 2006.

  1. #1
    Hey, I have this programming exercise for school. I dont think it is too difficult, the problem is, it has to be completely in OOP and I have never done anything in OOP PHP before. Ok here it goes:


    Step 01:

    Create a HTML/PHP Webform to upload files. The files should be stored in a temporary Directory on the Server. The directory should be able to be defined by an administrator.

    The File should be checked if it is in binary- or text-format. Binary Files aren't allowed, and if one attemtps to upload them, they should get an error message.


    Step 02:

    List the lines of the Textfile in Input Fields. a One Line Input Field for each line of text. The User should be able to edit the data in the Input fields, before they are imported into the database via a buttonclick. The Lines should belong to an entry of that textfile.

    Step 03:

    After the Import, display the textlines out of the imported File. The Lines should be generated out of the database.

    This Procedure of Uploading, Editing, Importing and Displaying should be able to be done more than once. Please keep that in Mind when designing your database. The Combination of Line and File should always be recognizable, and as an added Information the time and date of the Import.



    Other Rules:

    - please document your classes and functions
    - Use the template Engine http://smarty.php.net
    - Javascript based plausibility checks arent allowed
    - Please use PHP version 4 and MySQL version 4.1
    - The Script should be easy to install for anybody, therefore all required parameters should be stored in a seperate config file
    - Create Classes for: Database Access, Input checking, File Handling, PHP Input Parameters Handling($_REQUEST cannot be used in the actual Program File, only in the class)
    - please send us the SQL Statements for creation of the database tables







    Please help me, I dont expect someone to code the entire thing for me(although that would be awesome :), but at least a roadmap please.


    thanks
     
    Jayson, May 27, 2006 IP
  2. daboss

    daboss Guest

    Messages:
    2,249
    Likes Received:
    151
    Best Answers:
    0
    Trophy Points:
    0
    #2
    err... then how would you learn. why not sit down and try before asking...
     
    daboss, May 27, 2006 IP
  3. Jayson

    Jayson Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I have never done ANY programming in OOP before. With regular procedural techniques, I could probably wiggle my way through this, but not in OOP. Thats what I need help for
     
    Jayson, May 27, 2006 IP
  4. daboss

    daboss Guest

    Messages:
    2,249
    Likes Received:
    151
    Best Answers:
    0
    Trophy Points:
    0
    #4
    as a student, that's what you're supposed to do - try and learn. this is an internet forum... what type of help are you expecting besides someone doing the work for you?
     
    daboss, May 27, 2006 IP
  5. Jayson

    Jayson Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Some resources on OOP PHP besides the one at phpfreaks, and maybe a tutorial on how object oriented programs are built. Ever read the book "Build your own Database Driven Website with PHP and MySQL" ? Thats the book that helped me learn PHP in the first place. He gave a little theory of PHP and mySQL in the beginning, and then jumped straight into applying it to real situations.

    There is no doubt that I could learn this on my own given enough time, but I got the assignment on friday and it has to be done by monday.
     
    Jayson, May 27, 2006 IP
  6. clancey

    clancey Peon

    Messages:
    1,099
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Your prof would have explained how OOP works and how to create classes and inheritance and such.

    If you missed those classes, this same information is in the text books that you bought for your course and/or any hand outs you received.

    If you received none, your local library may have books on OOP in its library.

    If you do not have a library, there are plenty of web tutorials on OOP programming. They will provide the framework for you to do your homework.

    Do not claim you do not have access to that kind of material on the internet. You found your way here in hopes of finding someone to do your homework for you.
     
    clancey, May 27, 2006 IP
  7. Jayson

    Jayson Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    haha you have no idea how bad my Prof is at explaining things.

    I am not looking for someone to do the homework for me, but lets be real here: Most of the internet resources suck. I dont have a lot of time to get this done, so I am asking for help. Whats so hard about posting a link in your bookmarks, that you know is good?

    I swear people on the net are so confrontational
     
    Jayson, May 27, 2006 IP
  8. ferret77

    ferret77 Heretic

    Messages:
    5,276
    Likes Received:
    230
    Best Answers:
    0
    Trophy Points:
    0
    #8
    when I was in school I tried the same thing, and people told me to go to hell, at the time I thought they were dicks, but now I know it was better that I actually took the time to do the work myself

    why don't you do the work until you get stuck then come back with a specific question
     
    ferret77, May 27, 2006 IP
  9. clancey

    clancey Peon

    Messages:
    1,099
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I am not trying to be confrontational Jayson.

    But, you are using up all your time posting the identical question in several forums -- I see you just joined SitePoint to post the identical request.

    ferret77 is right, you need to do your own research. Your prof has given you a good starting point by outlining the major classes need to perform this task.

    My best advice is to break it down into manageable bits and approach each segment with the view that it needs to work in any environment -- not just the web.

    Not every tutorial on the internet sucks. I have switched to it from books bnecause of the lower cost and the speed with which one can bore down into the details. I do not keep a bunch of links handy because my research tends to very specific. I never bookmark the resulting sites because I do not need to return to them.
     
    clancey, May 27, 2006 IP