ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 10 Weeks Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 24 May 2017 My Price 8.00

datum and list of operations

Due date is Friday July 22, 2016 at 2:30 pm  but I have to hand in a hard copy as well so 1:30 pm would be the actual due time.

 

Asn 3 – Due July 22nd, 2016 (2:30pm)Problem 1 [10 marks]Consider the Queue ADT discussed in class along with its datum and list of operations:-print(Q)Prints out the sequence of data from the front of the queue to the back.-enqueue(Q,x)Puts the data x into the back of the queue-dequeue(Q)Returns and removes the data from the front of the queue-isEmpty(Q)Returns 0 (false) or 1 (true) depending on whether the queue is empty-size(Q)Returns an unsigned integer representing the number of elements in the queue-peek(Q)Returns the next data to be dequeued but doesn’t actually dequeue it (it takes a ‘peek’)You are to write a C program that creates a Queue datatype with an array of integers (among otherattributes). Using the operations available for a C array, implement each one of the functions describedabove (some are more straight forward than others). Please note that C only has static arrays, yourimplementation must take that into account (especially when executing enqueue and dequeue).Here is the start of your structure.typedef struct {int * data;// array of the data on the queue…} queue_t;In your code, you should also include a test case that tests each one of these functions.

Attachments:

Answers

(11)
Status NEW Posted 24 May 2017 01:05 AM My Price 8.00

-----------

Attachments

file 1495588225-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)