Experience Level: Intermediate
Project should be coded up to University Standard; it should be coded in C language
1. Creating objects e.g., Staff (S1, S2, S3), Branch (B1, B2 and B3) and department (D1, D2, D3).
A Staff should be created under a Branch and also should belong to a department. i.e. B1 has S1, S2 and S3 and B2 has S4, S5 and S7.
B3 and S7 these will be transient objects and the rest will be Persistent Objects.
B1 will be managed by SI which has S1, S2 and S3 WHERE B2 will be managed by S4 and will have S4, S5 and S6.
2. These will then be displayed in a tree like form starting with the first node that should be called PRN (Persistent Root Node). Under this node, there should be branches that have staff associated to them and these in turn should belong to Department.
3. These objects should also be stored in a table called ROT. This table should hold both persistent and transient objects; where Persistent (should live beyond the life) and Transient should be deleted when the program is terminated.
4. The ROT table contains two fields: The unique object identifier (OID) and the location of object in memory (MA). These are the objects which have been created in the first instance i.e. STAFF, BRANCH AND DEPARTMENT.
5. Pointers should be made for each OID .These objects once linked to pointer; they are then placed in a table called POT (Persistent Object Table). Objects in this table are stored even after the program has been terminated.
6. There should be an option to read the objects back hence traverse the process.
7. On terminating the program and executing it again, all the objects in the POT Table must be present in the tree with PRN node
Option: 1. Enter Objects
Enter the staff, branch and department here.
Option: 2. Attach objects to PRN node like: S1 belongs to B1 (INSERT)
B1 has S1, S2 and S3
D1 has S1 and S4
These are all stored in a table called ROT. ROT table will have two columns: OID (Object Identifier) and MA. (Memory Address)
Option: 3. Pointier swizzling
Using the OID, get the position of each object in memory and then put the selected objects into a table called POT. This is the table that contain Persistent Objects which will live beyond the program life.
Option: 4. Read the persistent objects (File I/O Should read and write
Objects from/to the disk
Display all the objects in the POT table. (SELECT)
Option: 5. Update some objects which have not been updated
(PERSISTENT) and write the rest in the disk. (TRANSIENT). (UPDATE)
Option: 6. Read objects from POT table. This will unswizzle the objects
by inversing the pointer swizzling process (TRAVERSE PRN)
Option: 8. Delete Object. Select an object and delete it permanently from
the memory. Set Flag when deleted.
Option: 9. Display objects to see if the deleted object is not there.
Option: 10. Exit ~ (Stop application)
- Persistent working through PRNs.
- It is a network structure, so we need software for that Networking.
- Set flag for deleted objects.
- File I/O Should read and write objects from/to the disk
- How object identifier is changed to memory address.
Mwajuma A.0% (0)
16 Sep 2021
Login to your account and send a proposal now to get this project.Log in
Clarification Board Ask a Question
There are no clarification messages.