怎么写这段代码 [英] how can write this code

查看:98
本文介绍了怎么写这段代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

•创建一个名为Student的结构:

• Create a struct named Student:

Struct  Student
{
      char     Name[32];
      int      ID;
      float    GPA;
      // add data members if needed
};

Class BST
{
Int  length;
// add data members if needed

public:
BST ();		// constructor :contains data members initialization 
void Addto BST (Student ); 	 //Add a new element to the BST
void Deletof BST ();	//Remove  element (if it exists).
void ViewLNR();		//View Queue Items in Forward order.
void ViewRLN();		//View Queue Items Backward order.
void search();	     // Search for a Student   according to StudentNumber.
};


在程序的主体中,执行以下操作:
•定义类型为DoublyLinkedQueue的对象.
•为用户提供菜单,其中包含以下选项供您选择:

1.将元素添加到BST中.
2.从BST卸下前部元件.
3.在BST中搜索元素.
4.按LNR顺序查看BST元素
5.以LNR顺序查看BST元素.
6.退出.


In the main of your program the following is performed:
• Define an object of type DoublyLinkedQueue.
• Provide the user with a menu with the following options to choose from:

1. Add element to the BST .
2. Remove the front element from the BST .
3. Search for element in the BST.
4. View BST elements in LNR order
5. View BST elements in LNR order .
6. Exit.

推荐答案

我们不做作业:它是有原因的.在这里,您可以考虑自己被告知的内容,并尝试理解它.也可以在那里帮助您的导师识别您的弱点,并将更多的注意力放在补救措施上.

自己尝试,您可能会发现它并不像您想的那么困难!
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!


这篇关于怎么写这段代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆