数据结构程序 [英] data structure programe

查看:81
本文介绍了数据结构程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想制作一个程序,该程序的要求在下面给出

使用单链表的概念实现课程注册.
一个特定学期的学生数据将保存在一个链接列表中.学生链接列表的每个节点将指向该特定学生将在其中注册的课程的另一个链接列表.

该程序的菜单应允许以下操作:
1.创建学生的链接列表(姓名,注册号和批号).
2.创建所提供课程的链接列表.
3.可以注册特定课程的学生的功能(课程名称和课程代码).
4.允许该设施查看:
•仅一名学生的课程
•所有学生的课程
•一门特定课程的学生.

好的,任何人都可以帮助我,请给我有关该程序的想法,我应该怎么做,
链接列表很容易编程,但是在说明要求时,我应该如何相互映射学生和课程的链接列表.

i want to make a programe ,the programe requirements is given below

Implement the course registration using the concept of single linked list.
The data of students of a particular semester will be maintained in one linked list. Each node of the student linked list will point to another linked list of courses in which that particular student will get registered.

The menu of the program should allow the following operations:
1. Creation of linked list of students (Name, Reg.No and Batch No).
2. Creation of linked list of offered courses.
3. The function to register students in particular courses (Course Name and Course code).
4. Allow the facility to view:
• The courses of only one student
• The courses of all the students
• Students in one particular course.

kindly any one help me ,r give me idea about this programe how should i do,
link list is easy to programe but how should i map the student and course link list with each other as the requirment is stated.

推荐答案

如果要发布您的作业,至少要使它看起来像您自己尝试做某事!

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

自己尝试,或学习魔语:您想要炸薯条吗?"
If you are going to post your homework, at least try to make it look like you have attempted to do something yourself!

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, or learn the Magic Words: "Do you want fries with that?"


1.编写一个打印"hello world"然后退出的程序.
这只是为了验证您的编程环境是否正常工作,并且您知道如何使用它.

2.更改程序以显示你好,你叫什么名字?",然后阅读你的回答,然后显示你好<你的名字>"

3.将初始问题更改为类似于菜单的内容,例如
"a)我的首选
b)我的第二选择"
然后读取输入("a"或"b"-如果读取其他内容,则显示错误消息)
然后打印出这样的选择
您选择了选项b"

4.从您的分配中将选择更改为一个,并为每个选择调用一个函数,例如void choice_a()或最好是更具描述性的函数.现在只提供带有空主体的函数实现.

5.考虑手头的任务并初始化要维护的数据结构.只需将指向列表头的指针设置为0即可.

6.对于根据选择调用的每个函数,请考虑必须执行的操作并加以实现.

7.如果您对上述任何一个步骤有任何疑问,请返回给我们并指出该特定问题.但是请务必先解决它们,否则您将不会学到任何东西.
1. write a program that prints "hello world" and then exits.
This is just to verify that your programming environment works and you know how to use it.

2. change the program to print "hello, what is your name?", then reads your response, and then prints "hello <your name>"

3. Change the initial question to something that resembles a menu, like
"a) my first choice
b) my second choice"
then read input (''a'' or ''b'' - if reading anything else, print an error message)
then print out the choice, like this
"you chose option b"

4. change the choices to the one from your assignment, and for each choice call a function such as void choice_a() or preferably something more descriptive. Just provide function implementations with an empty body for now.

5. consider the task at hand and initialize a data structure that you are going to maintain. It may be as easy as setting the pointer to the list head to 0.

6. For each function that you call according to the choices, consider what must be done, and implement it.

7. If you have any trouble with any one of the steps above, come back to us and point us to that specific problem. But do try to solve them first, or you will not learn anything.


您好,我是Afzal Ahmad.有人告诉我您在这里发布了项目查询.如果您不介意我可以帮助您...
Hi, I am Afzal Ahmad. Some one told me U posted Project Query here. If u dont mind can I help u......


这篇关于数据结构程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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