汽车经销店的域建模或类图

发布于 2024-07-06 18:11:39 字数 395 浏览 7 评论 0原文

我正在尝试在 UML 中为汽车经销商绘制域模型或类图。 我对如何在模型中呈现试驾感到困惑。 一种方法是预约课程,然后作为子课程试驾。 经销商还提供售后车辆服务,因此我可以将预约/预订类别作为超级类别,然后将车辆服务和试驾作为两个子类别。

另一种方式是让客户等级与预约等级下的试驾等级和车辆服务等级有直接关系。

经销商还销售新车和二手车及其零件。

经销商还为汽车销售提供融资。

试驾级别与车辆级别是否有关系,或者显示级别和试驾级别有单独的级别?

另一个问题是如何在模型中显示潜在客户以及他们对销售和服务的询问。 如果允许用于营销目的,经销商希望保存潜在客户的详细信息。 我应该有两个类:一类用于客户,一类用于潜在客户,还是可以仅通过使用客户类中的属性来实现?

I am trying to draw a domain model or class diagram in UML for car dealership. I am stuck with how to present test drive in the model. One way is to have appointment class and then test-drive as sub class. A dealer also offers after-sale vehicle service so i could have appointment/booking class as super class and then vehicle service and test-drive as two sub classes.

Another way is to have the customer class have a direct relationship with test drive class and vehicle service class under appointment class.

A dealer also sells new and used cars and their parts.

A dealer also offers finance for car sale.

Would testdrive class have relationship with vehicle class or there is separate class for display and testdrive class?

Another question is how do I show potential customers and their inquiries about sale and service in the model. A dealer wants to save details of potential customers if they allow for marketing purposes. Shall I have two classes: one for customers and one for potential customers or it can be achieved just by using an attribute in customer class?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

烟酉 2024-07-13 18:11:39

您实际上只能通过一组良好的用例或模型的预期行为来区分正确的决策。

这将告知特定的子分类是否真的准确。

我可以看到,一个约会可能包含多次试驾,这些试驾本身与各个车辆相关联,因此试驾本身只不过是从客户到与约会相关联的车辆的链接。

You can really only distinguish the right decision by having a good set of use cases or expected behaviors of the model.

This will inform whether a particular sub-classing is really accurate.

I can see that an appointment might contain several test-drives, which are themselves linked to individual vehicles, So a test-drive itself is nothing more than a link from a customer to a vehicle which are linked to an appointment.

攒一口袋星星 2024-07-13 18:11:39

试驾将包含仅与试驾相关的信息:

对客户的参考 - 即使这可能有争议,包括

位置的车辆长度的参考

对试驾

(也许车辆在与可以确定的位置不同的位置驾驶) ,

可能

但是

试驾对象中没有的内容是与约会相关的任何内容 - 因为它总是包含在集合中 - 约会或其他事件容器的一部分。 现在,如果可以包含测试驱动的容器始终包含客户信息,我什至可能不会在测试驱动对象中包含客户引用 - 毕竟,它将是多余的。

这取决于试驾是否可以在非预约场景中进行 - 也许是在“销售活动”或“开放日”或在用例中实际未创建预约的情况下 - 或者是否会为多个客户进行试驾在一个容器内。

test-drive would contain the information relevant only to the test-drive:

reference to the customer - even this might be debatable to include

reference to the vehicle

length of test drive

location (perhaps the vehicle was driven at a different location than could be determined from the owning appointment)

customer temperature (hot or cold - i.e. did the customer seem enthusiastic)

comments

etc.

But what is not in the test-drive object is anything related to the appointment - since it is always contained in a collection - possibly as part of an appointment or some other event container. Now if the containers which can contain test-drives always include customer information, I might not even include the customer reference in the test-drive object - after all, it will be redundant.

It depends if test-drives can occur in non-appointment scenarios - perhaps at a "sales event" or an "open house" or something where appointments are not actually created in the use cases - or if test-drives for multiple customers will occur within a container.

心病无药医 2024-07-13 18:11:39

您问题的第二部分已被忘记(当您同时提出两个问题时很容易完成):

另一个问题是如何在模型中显示潜在客户以及他们对销售和服务的询问。 如果允许用于营销目的,经销商希望保存潜在客户的详细信息。 我应该有两个类:一个用于客户,一个用于潜在客户,还是可以仅通过使用客户类中的属性来实现?

我认为你的用例是“经销商希望保存潜在客户的详细信息,如果他们允许营销目的。” 最简单的解决方案是拥有一个邮件列表集合,其中包含每个潜在客户的姓名和地址。

The second part of your question has been forgotten (easily done when you ask two questions in one):

Another question is how do I show potential customers and their inquiries about sale and service in the model. A dealer wants to save details of potential customers if they allow for marketing purposes. Shall I have two classes: one for customers and one for potential customers or it can be achieved just by using an attribute in customer class?

I think your use case there is "A dealer wants to save details of potential customers if they allow for marketing purposes." and the simplest solution is to have a Mailing List collection which holds name and address of each potential customer.

秋心╮凉 2024-07-13 18:11:39

我认为你没有抓住重点。 领域模型的目的是让您熟悉领域:

-- What kind of entities you have in yor domain?
-- If they are important for your system under desing, 
   what kind of properties they have, how they behave?
-- What kind of business rules they obey?

剩下的就是细节。 像地图制作者一样思考。 记录下有什么。创建一个简单的地图,这样您就不会在该领域迷失方向。 不要尝试发明。抽象领域中存在的内容:不要在您自己创建的“花哨的抽象”后面运行。

域模型可以用作源
用于面向对象的分析/设计。
但他们的目的不是代表
软件抽象。

I think you miss the point. The aim of the domain model is make famliiar you with the domain:

-- What kind of entities you have in yor domain?
-- If they are important for your system under desing, 
   what kind of properties they have, how they behave?
-- What kind of business rules they obey?

The rest is details. Think like a map maker. Record what there is.Create a simple map so you can not lost your way in that domain. Not try to invent.Abstract what exist in the domain: Not run behind the "fancy abstractions" you created yourself.

Domain model can be used as a source
for object oriented analysis/design.
But their aim is not to represent
software abstractions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文