Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help Important Notes : Please: Use your Console and Scheduler (FIFO) . You must use S emaphore to control operation. You must use Timer

Please help

image text in transcribedimage text in transcribed

image text in transcribedimage text in transcribed

image text in transcribed

image text in transcribed

Important Notes:

Please:

  1. Use your Console and Scheduler (FIFO).
  2. You must use Semaphore to control operation.
  3. You must use Timer to generate tick of time.
  4. You must use File System to save the data.
  5. Use KThread.
Dumpster Taste Podcast Dumpster Taste Podcast is an up-and-coming podcast with some of its members being Joe, Grant, and Cannur. And by up-and-coming, they just had the idea a few weeks ago. The group wanted to create but they don't have any idea about creating a podcast. Your task now is just to create an application to simulate the creation of episode and managing them. The features provided in this application are creating, viewing and delete episodes. As a programmer, you are asked to create the application using nachOS in Java programming language. In the start of the application, the program will look for a file named "episodes.txt which will be converted into an acceptable episode's data and load it into the system with the help of file system if the file is available. After the said process has been completed, the application will then show 4 menus which represent features in the application which are: Create Episode View Episodes Delete Episode * Exit Dumpster Taste Podcast 1. Create Episode 2. View Episodes 3. Delete Episode 4. Exit >> Figure 1. Main menu 1. Create Episode The first menu option let the user create a new episode and insert it into the system. This option requires the user to input information regarding the episode that follows the following detail which are: Ask the user to input episode's Title. The episode's title must be between 5 and 25 characters (Inclusive) Input your episodes title [5-25 characters Inclusive] : pow Input your episodes title [5-25 characters | Inclusive] : Bidet Comfort Figure 2. Title input Ask the user to input episodes Duration. The episode's duration must be between 10 and 60 (Inclusive). Input your episodes duration (10-60 | Inclusive] : 5 Input your episodes duration (10-60 Inclusive] : 20 Figure 3. Duration input Initialize the episode's views to be 0. After all the required input has been filled, save the input to the file named "episodes.txt" with the following format and show a success message to the user. [Episode Title]#[Episode Duration]#[Episode Views] Creating the episode..... Finished creating the episode! Figure 4. Success message 2. View Episodes The second option of the menu (View Episodes) allows the user to view all data read by the file system. The process follows the following steps which are: Check if episode list has any data. If the episode list didn't have any data, the application will show an error message to the user. There aren't any episodes yet.. Figure 5. View validation Otherwise, if the episode list is already filled the application will show all files received. 1. Bidet Comfort Views : 6 Duration : 20 Watching your own episodes to get the views going [Y/N Case Sensitive)? Figure 6. View all data If the episode is already filled, ask the user whether they want to view their episodes using the input Y or N (Case Sensitive). Check if the user answer with N then redirect the user back to the main menu. Otherwise, using KThread and Scheduler (FIFO concept), show a message that each video is being watched. The message will be shown with delay of 100 milliseconds multiplied by the duration of the episode (using Thread sleep). After that, increase the views of each episode by 1 and update the views in the "episodes.txt file. Lastly, redirect the user back to the main menu. Watching your own episodes to get the views going [Y/N Case Sensitive)? Y Watching Bidet Comfort.. Updated the views to 1! Finished watching! Figure 7. Viewing each Episode 3. Delete Episode The third option in the menu allows the user to delete an episode from the list. The deleting process follows the following steps which are: Check if episode list has any data. If the episode list didn't have any data, the application will show an error message to the user. There aren't any episodes yet.. Figure 8. Delete validation Otherwise, the application will print all episode-on-episode list and ask the user what index of the episode that the user wants to be delete. The deleted index starts from 1 to episode list data size. u 1. Bidet Comfort Views : 1 Duration : 20 Choose a video to delete (1-1) : 2 Choose a video to delete (1-1] : 1 Episode removed! Figure 9. Delete book After episode deletion has been completed successfully, Update the data in file "episodes.txt" and direct the user back to the main menu. . 4. Exit If the user chooses the fourth Menu (Exit), the application will print real time minutes passed since the application started using a timer and show the user a message that says: "Thank you for making the podcast better!. Minutes could be calculated from the following formula: 1 Minutes = 60 Seconds 1 Seconds = 10.000.000 Timer Ticks You have been logged in for 51 minute(s) Thank you for making the podcast better! Figure 10. Exit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Solaris 11.2 System Administration (oracle Press)

Authors: Harry Foxwell

1st Edition

007184421X, 9780071844215

More Books

Students also viewed these Databases questions