1 / 4

summary labs

summary labs. The subjects we take it in the labs until now it was example about data structure*: linked list: you can add and delete the node from head and tail ,also you can delete specific node in your liked list . Stack: you can add and delete node from head (push, pop)

mervyn
Download Presentation

summary labs

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. summary labs nora albabtin

  2. The subjects we take it in the labs until now it was example about data structure*: linked list: you can add and delete the node from head and tail ,also you can delete specific node in your liked list . Stack: you can add and delete node from head (push, pop) Queue: you can add node from tail and delete node from head(enqueue, dequeue) *Data Structure is an arrangement of data in a computer’s memory (or sometimes on a disk). Data structures include linked lists, arry , stacks, binary trees, and hash tables. nora albabtin

  3. Data Structure linked list • Stack • Queue Class for create the node or item (materials) witch contain : Data(info) Pointer(next) In this class you need to write in the Public: 1-Constructor function for node. 2-define data variable 3-define Next pointer Note : any pointer you want to use it in your program it must be from type this class. • all of them need two classes to executed in c++ program • Class for operations or function • (Manpower)which use it to manipulate the node . In this class you need to write in the : 1- Public: define the Constructor function and here give the head and tail initial value (0) and any pointer you want to use it as public. And then write all the functions you want to use it in your program for example add, delete and any function whether basic function which existing in your slides or functions which have new idea from your teacher . 2- Private: define tail and head and any pointer you want to be public in your program like counter . nora albabtin

  4. Notes : • Any pointer you want to define in your program whether as a public or inside any function(private) you must define it from type class node(first class) . • Any operation you need to apply it for all the nodes (items) you must use a pointer define it from class node and give it initial value (pointer =head), Then use it in the while or for loop ,the condition must be (pointer !=0)to pass until up the last item which it`s point to 0 . nora albabtin

More Related