Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Need Program

triky3000triky3000 Posts: 8Member
I need a program wich contained arrays and a little database made with record. for example make a program wich showed the marks of 5 students. Could someone help ? PLEASE...

Comments

  • zibadianzibadian Posts: 6,349Member
    : I need a program wich contained arrays and a little database made with record. for example make a program wich showed the marks of 5 students. Could someone help ? PLEASE...
    :
    Start by defining your records. Then define your array. Finally write a procedure to fill one record, show one record, show all records, etc.
    [code]
    type
    TStudent = record
    Name: string;
    Mark: integer;
    end;

    const
    MaxStudents = 20;

    type
    TStudents = array[0..MaxStudents-1] of TStudent;

    var
    Students: TStudents;

    procedure EditStudent(index: integer);
    begin
    { Write code to update indexth student }
    end;

    procedure ShowStudent(index: integer);
    begin
    { Write code to show indexth student's info }
    end;

    procedure ShowAllStudents;
    var
    i: integer;
    begin
    for i := 0 to MaxStudents-1 do
    ShowStudent(i);
    end;
    [/code]
  • triky3000triky3000 Posts: 8Member
    : : I need a program wich contained arrays and a little database made with record. for example make a program wich showed the marks of 5 students. Could someone help ? PLEASE...
    : :
    : Start by defining your records. Then define your array. Finally write a procedure to fill one record, show one record, show all records, etc.
    : [code]
    : type
    : TStudent = record
    : Name: string;
    : Mark: integer;
    : end;
    :
    : const
    : MaxStudents = 20;
    :
    : type
    : TStudents = array[0..MaxStudents-1] of TStudent;
    :
    : var
    : Students: TStudents;
    :
    : procedure EditStudent(index: integer);
    : begin
    : { Write code to update indexth student }
    : end;
    :
    : procedure ShowStudent(index: integer);
    : begin
    : { Write code to show indexth student's info }
    : end;
    :
    : procedure ShowAllStudents;
    : var
    : i: integer;
    : begin
    : for i := 0 to MaxStudents-1 do
    : ShowStudent(i);
    : end;
    : [/code]
    :
    dam didn't got the idea of this prog... :/
  • zibadianzibadian Posts: 6,349Member
    : : : I need a program wich contained arrays and a little database made with record. for example make a program wich showed the marks of 5 students. Could someone help ? PLEASE...
    : : :
    : : Start by defining your records. Then define your array. Finally write a procedure to fill one record, show one record, show all records, etc.
    : : [code]
    : : type
    : : TStudent = record
    : : Name: string;
    : : Mark: integer;
    : : end;
    : :
    : : const
    : : MaxStudents = 20;
    : :
    : : type
    : : TStudents = array[0..MaxStudents-1] of TStudent;
    : :
    : : var
    : : Students: TStudents;
    : :
    : : procedure EditStudent(index: integer);
    : : begin
    : : { Write code to update indexth student }
    : : end;
    : :
    : : procedure ShowStudent(index: integer);
    : : begin
    : : { Write code to show indexth student's info }
    : : end;
    : :
    : : procedure ShowAllStudents;
    : : var
    : : i: integer;
    : : begin
    : : for i := 0 to MaxStudents-1 do
    : : ShowStudent(i);
    : : end;
    : : [/code]
    : :
    : dam didn't got the idea of this prog... :/
    :
    This is a start of what you asked for: an array/record-based database of student information. All you need to do now is to fill in the blanks and make it a real program.
  • triky3000triky3000 Posts: 8Member
    : : : : I need a program wich contained arrays and a little database made with record. for example make a program wich showed the marks of 5 students. Could someone help ? PLEASE...
    : : : :
    : : : Start by defining your records. Then define your array. Finally write a procedure to fill one record, show one record, show all records, etc.
    : : : [code]
    : : : type
    : : : TStudent = record
    : : : Name: string;
    : : : Mark: integer;
    : : : end;
    : : :
    : : : const
    : : : MaxStudents = 20;
    : : :
    : : : type
    : : : TStudents = array[0..MaxStudents-1] of TStudent;
    : : :
    : : : var
    : : : Students: TStudents;
    : : :
    : : : procedure EditStudent(index: integer);
    : : : begin
    : : : { Write code to update indexth student }
    : : : end;
    : : :
    : : : procedure ShowStudent(index: integer);
    : : : begin
    : : : { Write code to show indexth student's info }
    : : : end;
    : : :
    : : : procedure ShowAllStudents;
    : : : var
    : : : i: integer;
    : : : begin
    : : : for i := 0 to MaxStudents-1 do
    : : : ShowStudent(i);
    : : : end;
    : : : [/code]
    : : :
    : : dam didn't got the idea of this prog... :/
    : :
    : This is a start of what you asked for: an array/record-based database of student information. All you need to do now is to fill in the blanks and make it a real program.
    :
    :(
Sign In or Register to comment.