复杂的C#代码 [英] Complex C# code

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

问题描述

不久前,我搬到了计算机科学系,落后于同学,我发现编写这段代码很困难。如果你能帮助至少部分,我将非常感激。

这是任务:



设置任务。 

目录存储信息关于两种PC的显示器的主要参数:LCD和触摸。购买价值超过5千Grn的电视调谐器的液晶显示器时,可享受5%的折扣。购买触摸显示器时,提供12美元b $ b b的贷款。

开发一个与这些显示器配合使用的程序。

实施2个版本的程序(控制台和Windows窗体界面。)
程序要求。

1.开发用于存储监视器数据的输入文件的结构。 br />
要在文件中描述LCD监视器,您需要存储以下信息:

- 模型;

- 制造商(例如,华硕,LG)

- 对角线;

- 电视调谐器(是,否);

- 许可(例如,1920x1080)
- 矩阵类型(例如,PLS)

- 成本。

要描述文件中的触摸屏,您需要存储以下信息:

- 型号;

- 制造商(例如,POS部门)

- 对角线;

- 许可(例如,1920x1080)

- 触摸屏类型;

- 硬盘容量;

- 费用。

注意。

为了在从集合中的文件中读取时区分显示器类型,您可以向文件添加功能。

您可以指定其他监视器参数。

2.开发类的层次结构(1个基数,2个导数)。

在基类中,保留有关监视器的一般信息,在衍生物特定的(液晶显示器的一个衍生类,感官的另一个)。在基类中公布一个虚拟方法,用于计算在派生类中实现
的购买价格。

购买价值超过5千的电视调谐器的显示器Grn a 5可享受%折扣。购买触摸显示器时,提供12个月的贷款。低于3%。在该方法中,有必要计算每个月的支付成本。

3.在控制台版本中,创建两个集合列表<>存储有关监视器的数据并填充文件中的集合。

4。实现该计划的功能:

- 添加,删除监视器;

- 编辑价格和特征数据;

- 查看触摸屏型号,按价格按升序排序;

- 仅选择液晶显示器;

- 指定公司的打印机选择;

- 搜索华硕液晶显示器;

- 计算液晶显示器的成本

- 计算1个月触摸显示器的支付成本。

5.在具有Windows窗体界面的项目中,使用LinkedList< T>采集。在表单上实现向前和向后方向上的集合元素的视图。


Not so long ago I moved to the Faculty of Computer Science, lagging behind the classmates and I find it difficult to write this code. If you can help at least partly, I will be very grateful.
Here is the task:

Setting up a task. 
The catalog stores information about the main parameters of monitors for two types of PCs: LCD and touch. When buying an LCD monitor with a tv tuner worth more than 5 thousand Grn a 5% discount is available. When buying a touch monitor, a loan is provided for 12 months.
Develop a program to work with these monitors.
Implement 2 versions of the program (console and with the Windows Forms interface).
Program requirements.
1. Develop the structure of the input file for storing monitor data.
To describe LCD monitors in a file, you need to store the following information:
- the model;
- the manufacturer (for example, ASUS, LG)
- diagonal;
- tv tuner (yes, no);
- permission (e.g., 1920x1080)
- type of matrix (for example, PLS)
- cost.
To describe the touch screens in a file, you need to store the following information:
- the model;
- the manufacturer (for example, POS Sector)
- diagonal;
- permission (e.g., 1920x1080)
- type of touch screen;
- volume of HDD;
- cost.
Note.
In order to distinguish between types of monitors when reading from a file in a collection, you can add a feature to the file.
You can specify other monitor parameters.
2. Develop a hierarchy of classes (1 base, 2 derivatives).
In the base class, keep general information about the monitors, in the derivatives - specific (one derivative class for the LCD, another for the sensory). Announce in the base class a virtual method for calculating the purchase price that is to be realized in derived classes.
When buying a monitor with a tv tuner worth more than 5 thousand Grn a 5% discount is available. When buying a touch monitor, a loan is provided for 12 months. under 3%. In the method it is necessary to calculate the cost of payment for each month.
3. In the console version, create two Collections List <> to store the data about the monitors and fill the collections from the file.
4. To implement the functions of the program:
- adding, removing monitors;
- Editing data on price and characteristics;
- viewing models of touch screens, ordered in price in ascending order;
- selection of LCD monitors only;
- the choice of printers of the specified firm;
- search for ASUS LCD monitors;
- calculation of the cost of the LCD monitor
- Calculate the cost of payment for 1 month of touch monitor.
5. In a project with the Windows Forms interface, use the LinkedList <T> collection. Implement on the form a view of the collection elements in the forward and backward directions.

推荐答案

这看起来像一个我们在这里没有帮助的家庭作业。对于任何人来说,它也太大了。请尝试自己做(如果需要,可以参加C#课程),然后在这里回复一下有关您编写的代码
的具体问题,我们可以帮助您。
This looks like a homework assignment which we do not help with here. It is also far too large for anyone to write for you. Please try to do this yourself (take a C# course if you need to) and then post back here with specific questions about the code you've written and we can help you at that point.


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

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