برامج

لخبراء البرمجة :) فضلاً لا امراً ساعدوني [الأرشيف] - برامج نت

المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : لخبراء البرمجة :) فضلاً لا امراً ساعدوني


Igora
04-27-2007, 11:34 AM
بسم الله الرحمن الرحيم

كيف حالكم يا شباب يا رب تكونو بخير :)

أنا عندي مشكلة كبييييييييييييرة جداً جداً

عندي تسليم مشروع في الكلية يوم الاثنين القادم ونزلت الاسئلة اليوم واكتشفت ان عندي امتحان في مواد احملها يوم الاحد

يعني يا اذاكر يا اسوي المشروع :smailes46:

قلت ما لي غير الله ثم مبرمجين برامج نت :smailes60:

المهم ما اطول عليكم هذي الاسئلة حقت البروجكت:
Using files, write the following equipment inventory application. A record in
your file should consist of the following fields:
a. A deleted field (one character)
b. A part number ( a sequence 5 numbers represented as a string)
c. The equipment’s type: a variable length field (examples: computer,
television, data show projector, overhead projector, etc)
d. The Manufacturer: a variable length field (examples: Dell, Toshiba,
Fujitsu, etc).
You should use a fixed record size of 35 bytes. Combine fixed field methods with
the delimited variable field method (use | as your delimiter) to represent data in
the record. Your file should contain a header record containing the following
fields:
a. The total number of records in the file (un-deleted)
b. The RRN of the last record freed by a delete operation or -1 if none.
Once your program is started, the user will interact with it using a menu like the
one below:
Choose one of the following :
1. Add an entry to the file
2. Display all records in the file showing the RRN of each
3. Delete an entry from the file
4. Un-delete an entry from the file
5. Calculate un-used space in all records
6. Exit
Option 1 - Ask the user to enter the new equipment data and then write that to
the file. Space taken up by deleted records should by re-used by this function
Option 2 – Simply list all the contents of the file showing only valid undeleted
records and their RRN
Option 3 – List all the contents of the file showing RRN values, and ask the user
to enter the RRN of the record s/he wants to delete. Upon selecting a record to
delete the record’s delete flag should be marked with v * and the header record
should be updated accordingly.
Option 4 – Display to the user all records marked as deleted as well as their
RRN. Use the header record (method described in chapter 6 to track down
these). Do NOT use linear search.
Option 5- records whose full capacity is not used will have some extra padding
characters. These are considered waste. For this option you should display the
wasted space in all records(in terms of bytes)
Option 6- exit the program.
Keep the menu running constantly until the user chooses to quit the program.


Create another version of the application you implemented in question 2
and modify it to use variable length records instead of fixed sized one. In
order to be able to reclaim freed space, a record size field should precede
each record. Use the | symbol as a field delimiter the # symbol as a
record delimiter.
Your file should contain a header record with one field:
· The byte offset of the last record freed by a delete operation or -1 if
none.
Once your program is started, the user will interact with it using a menu like the
one given in question 2 (with all six options) Option 2 however will now be:
2. Display all records in the file showing the byte offset of each
The de******ions of the various options will also now be as follows:
Option 1 - Ask the user to enter the new equipment data, and then write that to
the file. Space taken up by deleted records should by re-used by this function.
Use the first fit strategy to reclaim un-used space
Option 2 – Simply list all the contents of the file showing only valid undeleted
records and their byte offsets
Option 3 – List all the contents of the file assigning and showing a serial number
for each record (1, 2, 3, 4…) and ask the user to enter the serial of the record
s/he wants to delete. Upon selecting a record to delete the record’s delete flag
should be marked with a * and the header record should be updated accordingly.
Option 4 – Display to the user all records marked as deleted as well as their byte
offset. Use the header record (method described in chapter 6 to track down
these). Do NOT use linear search.
Option 5- records whose full capacity is not used (this will happen after
reclaiming space) will have some extra padding characters. These are
considered waste. For this option you should display the wasted space in all
records.
Option 6- exit the program.
Keep the menu running constantly until the user chooses to quit the program.

extend your project by maintaining a primary index file and a
secondary index file. The primary index file should contain a header record which
has the number of entries in the index, and a sync flag. Decide on the size of the
header record and fix the size of each record entry in the primary index. An entry
in the primary index will be a primary key ( you can use a part number for that),
and a byte offset for this entry in the original data file. The secondary index
should be built for a equipment’s type and should use the late binding approach.
You should always keep your indices sorted. Add the following extra option
before option 6, “Search for an equipment using its type”. If a user selects this
option, then s/he should be provided with all information related to the
equipment(s) whose type was entered, or provided with a message indicating
that data for this type can not be found. Use the implemented indices in
conjunction with binary search to implement this function.