设计模式作业
有没有地方可以找到用于实现设计模式的多项作业(以及解决方案?)
我的想法是以正确的方式进行实践。我想用Java 实现这些。目前我只需要基本的设计模式,而不是 J2EE 模式。
我实际上正在寻找要开发的完整应用程序,它使用大多数设计模式。 (单个作业中的所有设计模式)
Is there any place to find multiple assignments for implementing design patterns( along with solutions ?)
My idea is to get the hands on in a proper way. I would like to implement those in Java. at the moment I just need basic design patterns , not J2EE patterns.
I'm actually looking for the complete application to be developed which uses most of the design patterns. (All design patterns in a single assignment)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
给我建一个蚂蚁农场!!
你想要一个任务吗?我给你一张。截止日期为太平洋时间 2 月 22 日星期二晚上 9:00。您将为我建造一个蚂蚁农场,并且您将使用一些常见的设计模式来完成它。
这并没有包含所有的设计模式,因为这很愚蠢。然而,它确实有足够的能力使交互变得复杂,同时又足够简单以快速实现。完成此操作后,我们可以考虑为我们的蚂蚁农场添加更多功能!
我将根据需要添加要求(添加了哪些修订)。
需求如下:
功能需求:
技术要求:(设计模式以粗体显示)
界面要求:
蚂蚁农场的界面应该是一个命令行界面,包含以下命令:
spawn XY T
- 应该在物种的 X、Y 位置创建一个新的蚁群T. 输出应给出菌落的标识符,以便稍后对其进行控制。spawn 14 -32 Killer
在位置 x14 y-32 创建一群“Killer”蚂蚁。give IR A
- 应为由 I(创建时)资源 R 标识的群体提供数量 A 的give 1 food 50
为群体 1 提供 50 种食物。示例
give 3 Warriors 10
给出在 Colony 3 基地生成的 Colony 3 10 个战士。tick [T]
- 应执行 T 刻度操作。为了方便起见,允许不指定 T,只需勾选一次。tick 10
示例
tick
summary I
- 应该给出殖民地 I 的摘要。摘要提供有关该殖民地的信息。summary 1
可能会给出以下输出:输出:
summary 2
可能会给出以下输出:输出:
如果您遇到任何困难,请发表评论。我将尝试为您提供一些提示,例如空白类、方法头,或者只是关于如何使这些设计模式彼此交互的一般想法。
祝你好运,玩得开心!
Build Me An Antfarm!!
You want an assignment? I'll give you one. It's due Tuesday, February 22 at 9:00PM Pacific time. You are going to build me an antfarm, and you're going to use some common design patterns to do it.
This does not have EVERY design pattern, because that's just silly. It does, however, have enough that the interactions will be complex while being simple enough to implement quickly. Once this is done, we can look at adding in more features to our ant farm!
I will add requirements (with what revision they were added) as needs arise.
Here's the requirements:
Functional Requirements:
Technical Requirements: (Design patterns bolded)
Interface requirements:
The interface to the ant farm should be a command line interface with the following commands:
spawn X Y T
- should create a new colony at position X,Y of species T. The output should give an identifier for the colony so it can be controlled later.spawn 14 -32 Killer
creates a colony of "Killer" ants at position x14 y-32.give I R A
- should give the colony identified by I (at creation) resource R of amount A.give 1 food 50
gives colony 1 50 food.Example
give 3 warrior 10
gives colony 3 10 warriors that spawn at colony 3's base.tick [T]
- should perform T tick operations. For convience, allow T to not be specified, and simply tick once.tick 10
Example
tick
summary I
- should give a summary of colony I. A summary gives information about that colony.summary 1
might give the following output:Output:
summary 2
might give the following output:Output:
If you run into any difficulty, post a comment about it. I'll try to give you some hints like blank classes, method headers, or just general ideas about how to make these design patterns interact with eachother.
Good luck, and HAVE FUN!!
http://www.allapplabs.com/java_design_patterns/java_design_patterns.htm
上述网站迎合了少数设计模式,并且还提供了大量带有解决方案的示例
http://www.allapplabs.com/java_design_patterns/java_design_patterns.htm
The above site caters to few design patterns and it also has loads of examples with solutions
你也可以从《Head First Design Patterns》一书中获取问题。每章末尾都有很多谜题。
You can also take problems from the book "Head first design patterns". It has a lot of puzzle problems at the end of each chapter.