1 / 9

Distribute Mathematics

2005 Fall – TA Slide for Program HW #3. Distribute Mathematics. 3 rd Assignment (Min Heap, Max Heap). 2005.11.18 (Fri.) Choi Jung-Eun. Notice. Submit file: source ( 학번 _hw#.c), makefile Execution file name: hw3 If your program doesn’t work, please comment it on your source code Q&A

connie
Download Presentation

Distribute Mathematics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 2005 Fall – TA Slide for Program HW #3 Distribute Mathematics 3rd Assignment (Min Heap, Max Heap) 2005.11.18 (Fri.) Choi Jung-Eun

  2. Notice • Submit file: source (학번_hw#.c), makefile • Execution file name: hw3 • If your program doesn’t work, please comment it on your source code • Q&A • Web Site http://www.cs.hongik.ac.kr/~rts/class/undergraduate/2005_Fall/index.html • E-mail jechoi@cs.hongik.ac.kr Real-time systems Lab.

  3. Submit • submit <TA account> <Directory> • Example • TA account: rtsta • Directory: class/assignment (a/hw3) >submit rtsta a/hw3 • Due date: 12/02(Fri.) 20:00 (system clock) Real-time systems Lab.

  4. Assignment #3 – requirement • Program : Min Heap, Max Heap • You can use only 1-dimention array (size: 100) • Implementation of 5 instructions • Input: from keyboard • Output: to monitor Real-time systems Lab.

  5. Assignment #3 – usage • Add item • usage: “add <item>” • example: add 3 • Delete Max-value or Delete Min-value • usage: “del” • example: del • Show • usage: “show” • Find item • usage: “find <item>” • example: find 5 • Quit program • usage: “quit” Real-time systems Lab.

  6. Assignment #3 – exception handling • In case that instruction is not satisfied with given usage • In case that the item within the heap is added by add instruction Real-time systems Lab.

  7. Assignment #3 – example (1/2) >add 5<Enter> >add 20<Enter> >add 8<Enter> >add 9<Enter> >add 6<Enter> >adee 60<Enter> Error: Incorrect operation! >add 10<Enter> >add 9<Enter> Error: Can’t add item! >show<Enter> Min Heap 5 6 8 20 9 10 Max Heap 20 9 10 5 6 8 >find 9<Enter> Min Heap : 5 Max Heap : 2 Real-time systems Lab.

  8. Assignment #3 – example (2/2) >del<Enter> Min Value in Min Heap : 5 Max Value in Max Heap : 20 >show<Enter> Min Heap 6 9 8 20 10 Max Heap 10 9 8 5 6 >find 5<Enter> Min Heap : Not exist! Max Heap : 4 >quit<Enter> Real-time systems Lab.

  9. Due date • Assignment #2 • submit due date: 11/14 20:00 • Assignment #3 • submit due date: 12/02 20:00 • Assignment Grade Real-time systems Lab.

More Related