If anyone has any good ideas for a program please let me know... My final is coming up, and we have to create our own program, but i'm drawing a blank, any help would be great!

Dani AI

Generated

A compact, original project that fits the Pascal/text-only constraint is a menu-driven "Classroom Grade Manager" that stores student records, supports add/delete/search, exports CSV, and produces simple analytics (average, median, and a grade histogram). This builds on 's database idea while adding report-generation and batch operations to make the project feel unique. The design forces use of repeat/until for the menu and input validation and gives several natural places for nested loops (searching, grouping, histogram counting).

A minimal Pascal skeleton (schematic) showing the structure and where nested loops/repeat appear:

type
  TStudent = record
    id: integer;
    name: string[30];
    grade: real;
  end;

var
  Students: array[1..200] of TStudent;
  Count, i, j, choice: integer;
  f: file of TStudent;

{ Load, Save, Add procedures omitted for brevity }

repeat
  writeln('1 Add  2 List  3 Save  4 Histogram  5 Exit');
  readln(choice);
  case choice of
    1: begin { add record with repeat..until validation } end;
    2: for i := 1 to Count do writeln(Students[i].id, ' ', Students[i].name);
    3: begin rewrite(f); for i := 1 to Count do write(f, Students[i]); close(f); end;
    4: begin
         for i := 0 to 9 do
         begin
           for j := 1 to Count do
             if (Students[j].grade >= i*10) and (Students[j].grade < (i+1)*10) then
               inc(/*bucket*/);
         end;
       end;
  end;
until choice = 5;

Implementation notes and pitfalls: modularize (Load/Save/Add/Report), keep a Count to track used array slots or use a linked list if allowed, always check bounds before incrementing Count, handle eof and ioresult on file ops, and use repeat..until for robust input validation (e.g., force grade between 0 and 100). For uniqueness add keyword search, batch "apply curve" operation, CSV import/export, or a simple permission layer (teacher vs. viewer). 's text-based assumption and 's level question suggest scaling features up or down to match course requirements. For , the same record/loop patterns and repeat/until validation work well when building a digit-counting calculator or calendar utility.

Recommended Answers

All 6 Replies

what kind of level does it have to be? is a mammoth project or what? and are you doing it in pascal?

-----------------------------------------------------------------------------------
NEW - FREE pc support via Instant Messaging

If it's pascal, I'm guessing it's something like a text-based prog?

'tis text-based.Ha, it's in pascal because my school's not advanced enough to offer C+ or C++ :P
It's gotta have atleast one nested loop, repeat/until and such. I have a few ideas, but none of them qualify as UNIQUE.... and i'm by no means a master programmer. I'm just drawin' a blank.

text based with nested loop? OMG how many ideas do you want!??!?!?

Try this: A database program

In console mode (obviously) print a list of options (1 while loop and a switch statement (sorry thats c++, cant remember the pascal equiv) easy :) )

then have functions to add / delete records and load / save the file at the beginning / end of the program, view the next / previous record ect.... Trust me the nested loop will come easily. The record will have to be a defined data type so that should score some points!

Have a go with it! :)

hi
i must write code for calender that get two numbers of n digit(n:integer) and oprats(/,^,*). can you help me for write it?(in pascal);
thanks.

Hi,
could you try and explain your problem a little more so it makes sense!

Thanks

--------------------------------------------------------------------------FREE PC support via your favourite Instant Messaging program, go to

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.