Sprint 7 - Challenge 1
还没有人认领这个 Issue。
评估
调研方向
首先,将所需的 PCComponent 类型、PCComponentFactory 实现、PC 构建器和控制台菜单分别映射到独立的类中。检查每一项规格要求,包括组件选择、主题工厂、自定义、定价、规格、交付时间以及提交 PR 的要求;完成意味着完整应用支持列出的每个菜单选项。
由索引模型根据 Issue 内容生成。
描述
Sprint Challenge 1
Overview
The code you write for this challenge is mandatory homework and should be completed and sent in a PR for review before class.
Build a computer store application that allows customers to configure and purchase custom computers.
Specification
Java application with a console-based menu system:
-
User options:
- Build Custom PC (choose components manually)
- Select processor (budget/performance/enthusiast)
- Select graphics card (integrated/gaming/professional)
- Select memory (8GB/16GB/32GB)
- Select storage (HDD/SSD/NVMe)
- Customize options (case color, warranty, RGB)
- Quick Build - Budget PC
- Use appropriate factory
- Quick Build - Gaming PC
- Use appropriate factory
- Quick Build - Workstation PC
- Use appropriate factory
- View Available Components
- Exit
- Build Custom PC (choose components manually)
-
After building, display:
- Complete specifications
- Total price
- Estimated delivery time
Developer Guidance
- Create a PCComponent interface with methods:
String getName()double getPrice()String getSpecifications()ComponentType getType()(enum: PROCESSOR, GRAPHICS_CARD, MEMORY, STORAGE)- Create implementations: Processor, GraphicsCard, Memory, Storage
- With static factory methods for:
- Processor:
budget(),midRange(),performance() - GraphicsCard:
integrated(),gaming(),professional() - Memory:
standard8GB(),standard16GB(),performance32GB() - Storage:
hdd1TB(),ssd512GB(),nvme1TB()
- Processor:
- Create an abstract factory interface for creating complete component families - each factory should coordinate components that work well together for their purpose
interface PCComponentFactoryProcessor createProcessor()GraphicsCard createGraphicsCard()Memory createMemory()Storage createStorage()String getThemeName()String getDescription()
- Implement three themed factories:
BudgetPCFactory(£500-700)- Budget processor
- Integrated graphics
- 8GB memory
- HDD storage
GamingPCFactory(£1200-1500)- Performance processor
- Gaming graphics card
- 16GB memory
- NVMe storage
WorkstationPCFactory(£2000-2500)- Enthusiast processor
- Professional graphics card
- 32GB memory
- NVMe storage
- Create a PC class that uses a builder pattern to create instances,
- with fields:
- Processor (required)
- Graphics Card (required)
- Memory (required)
- Storage (required)
- Case colour (optional, default: "Black")
- Warranty years (optional, default: 1)
- And methods:
double getTotalPrice(sums price of components)String getDetailedSpecs(returns a nicely formatted string of the component parts → you can also just use an overridden toString here if preferred)
- with fields:
Submission & Review
Fork the coursework repo to your own GitHub account.
Make regular small commits with clear messages.
When you are ready, open a Pull Request to the CYF repo. Make sure you fill in the PR template provided.
A volunteer will review your submission and send you feedback.
- 主要语言
- 没有语言数据
- 星标
- 1
- 派生
- 11
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CodeYourFuture/Module-Java 的其他 Issue
-
🎯 Topic Programming Fundamentals 🏕 Priority Mandatory 🐇 Size Small 📅 Sprint 1 Core
难度 1/5 1 小时以内 新手友好度 85/100
-
🎯 Topic Programming Fundamentals 🏕 Priority Mandatory 🐇 Size Small 📅 Sprint 1 Core
难度 1/5 1 小时以内 新手友好度 85/100
-
🎯 Topic Programming Fundamentals 🏕 Priority Mandatory 🐂 Size Medium 📅 Sprint 7 Core
难度 5/5 一周以上 新手友好度 35/100
-
🎯 Topic Programming Fundamentals 🏕 Priority Mandatory 📅 Sprint 6 🦑 Size Large Core
难度 5/5 一周以上 新手友好度 25/100
-
🎯 Topic Programming Fundamentals 🏕 Priority Mandatory 🐂 Size Medium 📅 Sprint 5 Core
难度 4/5 3-5 天 新手友好度 45/100
查看 CodeYourFuture/Module-Java 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 1/5 1-3 小时 新手友好度 86/100
DavidAnson/markdownlint-cli2#940 ·
-
bug ci good first issue
难度 2/5 1-3 小时 新手友好度 88/100
-
enhancement
难度 1/5 1 小时以内 新手友好度 88/100
QuantStack/git2cpp#187 ·
-
needs-triage
难度 1/5 1 小时以内 新手友好度 92/100