Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Java Programming Problem

Options
  • 10-11-2005 2:10pm
    #1
    Closed Accounts Posts: 61 ✭✭


    here is a program my lecture gave me
    http://homepage.eircom.net/~iandowney/m2pra.htm

    heres a jist of it
    (a)Write a program for a 100-cell prison
    I have to store the following
    (i) the forename and surname of each prisoner
    (ii) age of each prisoner when he/she arrived in the prison
    (iii) original sentence handed down to the prisoner
    (iv) a seemingly random prison number allocated to each prisoner

    I have to an error check to allow for re editing of data.

    (b) Report of the age of the oldest prisoner,
    the prison number of the youngest prisoner,
    the cell number of the prisoner with the longest sentence
    the average age of the prisoners currently in the prison.

    (c) Allow prisoners release;
    if a prisoner is well-behaved,
    they have reached his/her 70th birthday
    or has served half of his/her sentence
    whichever happens soonest.

    Finally
    Write software to generate a report on the length each prisoner will serve assuming good behaviour, where each prisoner is referenced by her/his prisoner number. The report should be capable of being provided in order of prison number or in order of surname.

    badly need help


Comments

  • Moderators, Education Moderators Posts: 1,863 Mod ✭✭✭✭Slaanesh


    You should read the rules of this forum in the sticky. This smells of someone wanting there homework done. I suggest you try it yourself and then repost with more specific problems that you are encountering.

    No one wants to help someone who hasn't even had a go.


    Jayce wrote:
    here is a program my lecture gave me
    http://homepage.eircom.net/~iandowney/m2pra.htm

    heres a jist of it
    (a)Write a program for a 100-cell prison
    I have to store the following
    (i) the forename and surname of each prisoner
    (ii) age of each prisoner when he/she arrived in the prison
    (iii) original sentence handed down to the prisoner
    (iv) a seemingly random prison number allocated to each prisoner

    I have to an error check to allow for re editing of data.

    (b) Report of the age of the oldest prisoner,
    the prison number of the youngest prisoner,
    the cell number of the prisoner with the longest sentence
    the average age of the prisoners currently in the prison.

    (c) Allow prisoners release;
    if a prisoner is well-behaved,
    they have reached his/her 70th birthday
    or has served half of his/her sentence
    whichever happens soonest.

    Finally
    Write software to generate a report on the length each prisoner will serve assuming good behaviour, where each prisoner is referenced by her/his prisoner number. The report should be capable of being provided in order of prison number or in order of surname.

    badly need help


  • Closed Accounts Posts: 61 ✭✭Jayce


    having problems for the re editing part

    how do you let the user re edit some of the entries

    I have the arrays done sorta

    sorting the array should not be too bad but the releasing them if they served half their sentence doesnt seem to be working for me though.


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    You will need to post code.


  • Registered Users Posts: 7,677 ✭✭✭Trampas


    The lads are rightyou need to do the work yourself and post problems with code that you come across and people will help you.

    until you do that you are on your own


  • Registered Users Posts: 1,865 ✭✭✭Syth


    Just give us your lecturer's email address and someone will do it for you and submit for you. Easy Peasy.


  • Advertisement
  • Registered Users Posts: 4,276 ✭✭✭damnyanks


    Syth wrote:
    Just give us your lecturer's email address and someone will do it for you and submit for you. Easy Peasy.

    Syth don't be such a lazy punk. If you read the link he posted it has the whole assignment, the person who required the submission has stated they do not want their name on the internet as they do not want spam... honestly! :D


  • Moderators, Politics Moderators Posts: 39,788 Mod ✭✭✭✭Seth Brundle


    Syth wrote:
    Just give us your lecturer's email address and someone will do it for you and submit for you. Easy Peasy.
    well look at the url (...iandowney...) - presumably he also has the email iandowney AT eircom DOT net
    seems he is a lecturer in WIT
    selfp.jpg


  • Registered Users Posts: 7,498 ✭✭✭BrokenArrows


    The program seems fairly straight forward.

    Are you creating a GUI or are you going to be running it in DOS.

    The re-editing part should be fairly simple. I suppose you would get the user to enter the Prisioner ID number and display their details and then give them an option to edit any of the data above. If your using arrays to store the data simply overwrite the old data with the new one.


  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    I'm really, really hoping that the lecturer decides to check who's been linking to him.... :)


  • Closed Accounts Posts: 61 ✭✭Jayce


    delete this thread as it has broken the rules of the board


  • Advertisement
  • Moderators, Politics Moderators Posts: 39,788 Mod ✭✭✭✭Seth Brundle


    Jayce wrote:
    delete this thread as it has broken the rules of the board
    LOL - getting worried now?


This discussion has been closed.
Advertisement