Calculate the price
of
your order:

275 words
+
Approximate price
$ 0.00

Thread 1: the player thread    Can be implemented in C or C Thread 1: The player thread While playing, the player thread reads one word from the file, prints it, then sleeps until the next word should be displayed, and so on. Each word should be displayed on a separate line of output. (Words are white-space-separated runs of characters.) At a rate of 1.0, the player should print one word per second. At a rate of -1.0, the player prints one word per second, but proceeding backwards through the file. For this assignment, the player plays back text files, displaying one word per second at normal rate (1.0).  The player accepts the following commands: LoadFile(const      char *filename) — Prepares the player to playback the file whose name is      passed in. Stops the player if currently playing. Stop() —      Stops the player if currently playing. Start() —      Starts the player if currently stopped. Rewind() —      Sets the position of the player to time 0. SeekTo(int      byteoffset) — Sets the position of the player to the closest word      boundary past the given byte offset from the start of the file. SetRate(float      rate) — Sets the playback rate: 1.0 is forward at normal speed, – 1.0 is      reverse, 0.5 is forward at 1/2 speed, etc. The control threads The control threads generate commands for the player thread. You can think of each control thread as corresponding to a separate remote control. There are two kinds of control threads. The first kind waits for keypresses, and issues commands to the player thread based on the key pressed: ‘ ‘ (blank)      — toggles the player’s mode between ‘playing’ and ‘stopped’ ‘r’ —      rewinds the player ‘s’ —      prompts the user for a time, then seeks the player to that time ‘l’ —      prompts the user for a file, then loads the file into the player ‘t’ —      prompts the user for a rate, then uses it to set the player’s rate Two other control thread are “autonomous” controllers, simulating another user issuing commands. One of the autonomous controllers periodically issues a Stop() command to the player, while the other autonomous controller thread issues a Start() command every so often. Each of these autonomous threads should sleep for a random time interval of between 5 and 30 seconds before issuing each command. Your program should implement a function for each command (Start(), Stop(), etc.). These functions will be called by the control threads to control the player. Shared, global variables for the state, rate, position, etc. of the player thread are accessed by these routines, as well as the player thread routine. 

Basic features

  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support

On-demand options

  • Writer's samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading

Paper format

  • 275 words per page
  • 12pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, CHicago/Turabian, Havard)

Guaranteed originality

We guarantee 0% plagiarism! Our orders are custom made from scratch. Our team is dedicated to providing you academic papers with zero traces of plagiarism.

Affordable prices

We know how hard it is to pay the bills while being in college, which is why our rates are extremely affordable and within your budget. You will not find any other company that provides the same quality of work for such affordable prices.

Best experts

Our writer are the crème de la crème of the essay writing industry. They are highly qualified in their field of expertise and have extensive experience when it comes to research papers, term essays or any other academic assignment that you may be given!

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00

Expert paper writers are just a few clicks away

Place an order in 3 easy steps. Takes less than 5 mins.