This is my assignment for my CS class. I got the assignment but I have no clue how to do it. can anyone explain it to me? thx a lot!
Well, think about what a disk drive does.
Actually, the way you've stated it, you need to decide how literally to take the assignment. I see two different interpretations.
It probably means to simulate a file system which uses the disk drive. File systems allow files to be opened (and created if not existing), written, read, seeked, closed, and deleted. And the written data would have to be stored in a buffer that simulates the disk.
But the more literal interpretation would of a physical disk drive. Physical disk drives allow moving the heads to a particular cylinder, reading blocks and writing blocks. It doesn't actually know the difference between directory data and user data.
I'm guessing your instructor actually meant to simulate a file system.