如何设计,实现C ++代码 [英] How to Design, implement C++ Code

查看:70
本文介绍了如何设计,实现C ++代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Campus is one of the leading private institutes situated in Australia, offering MBA programs in partnership with Wimble University – UK. During the month of February and September there are lots of candidates inquire about their MBA programs, as a result the institute is now requires an inquiry system to save and search details about the inquirers to convert potential inquirers into registrations. The following are the details of the inquirer that need to be stored in the system.
•	Inquiry Number
•	Inquirer Name
•	Date of Inquiry
•	Address
•	Telephone No
•	Qualification
•	Email Address
•	Age

推荐答案

正如我所说,这是一个功课;它不会在这里受理。

如果你希望我们做你的功课,那就不行了。这背后有一个很好的理由:你不会学到任何东西,如果你希望别人为你做你的工作。



你可以尝试一下一开始就拥有,当你在任何地方停留时,来自这里的任何人都会尽力帮助你。但不要直接询问源代码



阅读代码项目快速解答常见问题解答 [ ^ ]首先:)



-KR
As I assume, this a homework; it won't entertained here.
If you expect us to do your homework, that's not going to work. There's a pretty good reason behind this: "You won't be learn anything, if you expect others do your work for you".

You can try something on your own at first and when you stuck anywhere, anyone from here would do his/her best to help you out. But don't directly ask for the source code.

Read the Code Project Quick Answers FAQ[^] first :)

-KR


我们不做你的作业:这是有原因的。它就是为了让你思考你被告知的事情,并试着理解它。它也在那里,以便您的导师可以识别您身体虚弱的区域,并将更多的注意力集中在补救措施上。



亲自尝试,你可能会发现它不是和你想的一样困难!



如果遇到具体问题,请询问相关问题,我们会尽力提供帮助。但我们不打算为你做这一切!
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!

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!


一如既往,你需要将作业细分为较小的部分,然后找到每个部分的解决方案。



在这种情况下,你可以用这样的术语思考:



1.创建一个包含所需信息的结构

这可以是一个结构或一个类,两种方法都是可能的,但是一个类可以实现更好的封装。

例如,您可以使用方法来序列化和反序列化数据。用于显示数据。



2.用户应该如何输入数据?

如果许多查询者将在同一会话中注册,则需要循环以便用户可以开始输入下一组数据。



3.你应该如何保存数据?

可能在一个文件,但它应该是一个文本文件还是结构化的二进制数据?

你还需要读回数据,所以选择了一个易于r的格式ead写道。



我认为这应该让你开始。
As always you need to break down the assignment into smaller parts and then find a solution for each part.

In this case you can think in terms like this:

1. Create a structure that will contain the required information
This can be a struct or a class, both approaches are possible but a class leads to better encapsulation.
For example you can have methods to serialize and deserialize the data and also for displaying the data.

2. How should the user input data?
If many inquirers will be registered in the same session you need to loop so the user can start to input the next set of data.

3. How should you save the data?
Probably in a file, but should it be a text file or as structured binary data?
You also need to read back the data, so chose a format that is easy both to read and write.

That should get you started, I think.


这篇关于如何设计,实现C ++代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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