Can you help me with Option 3. Schedule Project.
This is the whole problem:
3. Schedule Projects. Through this option, your friend should be able to do the following: a. Create Schedule. By choosing this option, your friend should be able to automatically create a queue that contains the schedule of the projects that are stored in the text file. The resulting queue should be displayed showing the id number of the documents to be copy-typed, in order by priority, then by size. b. View Updated Schedule. To display the most updated schedule, sorted by priority, then by size, in ascending order. If the schedule has not been created yet, this should prompt the user to create the schedule.
The Task A close friend of yours works as a freelance copy typist, working at home, for one of the Business Process Outsourcing (BPO) companies in Korea. Every Saturday evening, this friend receives copy- typing projects of various sizes, typically 50 to 500 pages of copy-typing work, some of which she must complete and submit back immediately. To help her manage, you decided to write a program that would schedule the copy-typing projects she receives. In this program, you will input the details of each project that arrives and store this information in a text file. Only copy-typing projects with information in this text file will be scheduled for copy-typing by placing them in a queue. You decided to apply the priority scheduling protocol and therefore place the project that must be completed immediately in the front of the queue and the project that may be delayed at the rear. Following is the general outline of your algorithm: 1. Input the copy-typing projects, with their size (number of pages) and priority information (the lower the number, the higher the priority) into the text file. 2. In a queue, sort the projects according to priority. If two projects has equal priority, then sort according to size, in ascending order (shortest-job first). 3. Apply first-come-first-served algorithm by getting the project from the front of the queue working until the one at the rear is completed. Your task, therefore, is to design, implement, and test the program just described using Python Programming Language. Submission and Presentation will on.
Design and implementation (60%) The application should have a menu system that would enable the user to access its functionalities. This menu may have the following options: 1. Input Project Details 2. View Projects a. One Project b. Completed Projects C. All Projects 3. Schedule Projects a. Create Schedule b. View Schedule 4. Get a Project 5. Exit Application should apply OOP, File management and Exception handling in Python. Details of the menu options are as follows: 1. Input Project Details. Through this option, your friend should be able to store information about the projects she received into a text file. This information includes the following: • ID Number - an integer that identifies the document to be copy-typed • Title - the title of the document. Size - number of pages Priority - an integer that identifies whether the project is immediate or not. The lower the number, the more immediate the project. 2. View Projects. a. One Project. To enable the user to search and view one specific document project using its ID Number b. Completed. To show the list of all documents that have been copy-typed. c. All Projects. To display all projects received. 3. Schedule Projects. Through this option, your friend should be able to do the following: a. Create Schedule. By choosing this option, your friend should be able to automatically create a queue that contains the schedule of the projects that are stored in the text file. The resulting queue should be displayed showing the id number of the documents to be copy-typed, in order by priority, then by size. b. View Updated Schedule. To display the most updated schedule, sorted by priority, then by size, in ascending order. If the schedule has not been created yet, this should prompt the user to create the schedule.
4. Get a Project. By choosing this option, your friend should be able to see the contents of the queue when the schedule was created and then do the following: a. Show a message that the topmost project from the queue is removed. b. Place the removed project's details to the Completed Projects text file. c. Display the queue showing that the topmost project has been removed. 5. Exit. This should end and close the program.
Can you help me with Option 3. Schedule Project. This is the whole problem:
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am