Find Jobs
Hire Freelancers

A Queue Class

$30-65 USD

ที่ทำเสร็จแล้ว
โพสต์ มากกว่า 22 ปีที่ผ่านมา

$30-65 USD

ชำระเงินเมื่อส่งงาน
Implement a FIFO, First-In-First-Out, data structure, also known as a "queue." A queue satisfies these rules: 1) It stores data for us; if we have a queue object, say q, then when we want q to store a number, say 7.3, we "add" it to the queue with a call: [login to view URL](7.3). 7.3 is then placed into the queue q and then joins the other numbers that were on the queue. 2) Whenever we go to retreive data called "removing") from the queue, the number we get will always be the "oldest" item that we added. So if we call [login to view URL]() 10 times after the first Add() above, and then we "remove" a number from the queue, the number returned by the Remove() method will the be 7.3. This also has the effect of removing 7.3 from the queue, so it is no longer there. If you Add() three times [login to view URL](); [login to view URL](4); [login to view URL](9); [login to view URL](2); Then the queue looks like this: oldest -> 4 9 2 next add -> If you then Remove() once, the 4 is returned from the queue and it will then contain: oldest -> 9 2 next add -> If you [login to view URL](7.3); at this point the queue becomes: oldest -> 9 2 7.3 next add -> If you Remove() now, the 9 will be returned and if you Remove() immediately after that, the 2 will be returned, leaving only the 7.3 on the queue. I think you get the idea. Implement a queue of characters using C++. The queue will consist of chars. The size of the queue, implemented using a fixed size array, should be small (say 3 or 5) to easily demonstrate an overflow condition in a test run. ## Deliverables Thus, after executing the main program segment: Queue q; cout << [login to view URL]() << endl; // should be empty [login to view URL]('a'); [login to view URL]('b'); [login to view URL]('c'); [login to view URL]('d'); // should overflow [login to view URL]('e'); // should overflow cout << [login to view URL]() << endl; cout << [login to view URL]() << endl; cout << [login to view URL]() << endl; cout << [login to view URL]() << endl; // should be empty [login to view URL]('h'); [login to view URL]('i'); [login to view URL]('j'); cout << [login to view URL]() << endl; cout << [login to view URL]() << endl; cout << [login to view URL]() << endl; cout << [login to view URL]() << endl; // should be empty the output on the screen would look like: ** empty queue ** ** full queue ** ** full queue ** a b c ** empty queue ** h i j ** empty queue ** The queue should be designed so that it will not be exhausted unless the number of items CURRENTLY waiting in the queue equals the size of the queue. That is, a queue defined to have 100 items, should be able to last FOREVER as long as there are no more than 99 items in the queue at any one time. Be sure to include a constructor in addition to the Init() method. An Init() method should do what a constructor does but in the mid-life of the queue object. Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased.
รหัสโปรเจกต์: 2836498

เกี่ยวกับโปรเจกต์

7 ข้อเสนอ
โปรเจกต์ระยะไกล
ใช้งานอยู่ 22 ปีที่ผ่านมา

กำลังมองหาการสร้างรายได้ใช่ไหม?

ประโยชน์ของการประมูลกับ Freelancer

กำหนดงบประมาณและกรอบเวลาของคุณ
รับเงินจากการงานของคุณ
อธิบายข้อเสนอของคุณในภาพรวม
ลงทะเบียนและเสนอราคาฟรี
หมอบหมายให้:
รูปอวาตาร์ของผู้ใช้
See private message.
$55.25 USD ใน 14 วัน
5.0 (80 รีวิว)
5.2
5.2
7 ฟรีแลนซ์กำลังเสนอราคาโดยเฉลี่ย $37 USD สำหรับงานนี้
รูปอวาตาร์ของผู้ใช้
See private message.
$25.50 USD ใน 14 วัน
4.9 (37 รีวิว)
4.5
4.5
รูปอวาตาร์ของผู้ใช้
See private message.
$21.25 USD ใน 14 วัน
4.5 (33 รีวิว)
4.2
4.2
รูปอวาตาร์ของผู้ใช้
See private message.
$51 USD ใน 14 วัน
5.0 (13 รีวิว)
4.0
4.0
รูปอวาตาร์ของผู้ใช้
See private message.
$42.50 USD ใน 14 วัน
5.0 (6 รีวิว)
3.7
3.7
รูปอวาตาร์ของผู้ใช้
See private message.
$23.80 USD ใน 14 วัน
4.7 (32 รีวิว)
3.3
3.3
รูปอวาตาร์ของผู้ใช้
See private message.
$42.50 USD ใน 14 วัน
0.0 (0 รีวิว)
0.0
0.0

เกี่ยวกับลูกค้า

ปักธงของ UNITED STATES
United States
5.0
79
ยืนยันวิธีการชำระเงินแล้ว
เป็นสมาชิกตั้งแต่ ต.ค. 18, 2001

การยืนยันลูกค้า

ขอบคุณ! เราได้ส่งลิงก์สำหรับเครดิตฟรีให้คุณทางอีเมลแล้ว
เกิดข้อผิดพลาดขณะส่งอีเมลของคุณ กรุณาลองอีกครั้ง
โลโก้ Freelancer Thailand / ภาษาไทย ช่วยเหลือและสนับสนุน FreelancerประเภทโปรเจคการประกวดFreelancerองค์กรแพ็กเกจสมาชิกโครงการ Freelancer ชั้นแนวหน้าการจัดการโปรเจคงานในพื้นที่Photo Anywhereหน้าจัดแสดงผลงานAPI สำหรับนักพัฒนาได้รับการยืนยันDesktop App เกี่ยวกับเกี่ยวกับเราวิธีใช้งานความปลอดภัยนักลงทุนแผนผังเว็บไซต์เรื่องราวข่าวออกสื่อทีมรางวัลข่าวประชาสัมพันธ์ร่วมงานกับเรา ข้อกำหนดนโยบายความเป็นส่วนตัวข้อกำหนดและเงื่อนไขนโยบายลิขสิทธิ์ข้อพึงปฏิบัติค่าธรรมเนียมและค่าบริการหุ้นส่วนEscrow.comLoadshiftWarrior Forum แอปโลโก้ Apple App Store โลโก้ Google Play
ไม่สามารถคัดลอกไปยังคลิปบอร์ดได้ โปรดลองอีกครั้งหลังปรับเปลี่ยนการอนุญาต
คัดลอกไปยังคลิปบอร์ดแล้ว
ผู้ใช้ที่ลงทะเบียน งานที่มีการโพสต์ทั้งหมด
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
กำลังโหลดตัวอย่าง
ได้รับอนุญาตสำหรับตำแหน่งทางภูมิศาสตร์
เซสชั่นการเข้าสู่ระบบของคุณหมดอายุและคุณได้ออกจากระบบแล้ว กรุณาเข้าสู่ระบบอีกครั้ง