跳至主要內容

Project A-two

AI悦创原创2023年8月7日Python 一对一教学Python 一对一教学大约 16 分钟...约 4919 字

Diploma of IT

资讯科技文凭

IAPP001 - Applications Programming

应用程序编程

ASSESSMENT TASK #2: PROJECT A

评估任务#2:项目a

TASK DESCRIPTION

任务描述

This project requires students to create an Object Oriented design and coded solution for a chosen application, using all the concepts taught in the subject.

该项目要求学生使用本课程所教授的所有概念,为选定的应用程序创建一个面向对象的设计和编码解决方案。

You may choose to complete this assessment with at most one (1) other person. To work as a pair; you and your partner MUST be in the same tutorial class. You will need to spend approx. 10 hours together working on the assessment (outside of tutorial hours). If you do not intend to spend this time working together – choose to complete the assessment on your own. Both partners must put in an equal amount of work and effort, or the group will be dissolved by the tutor.

您可以选择与最多一(1)人一起完成此评估。成对工作;你和你的伴侣必须在同一个辅导班。你将需要花费大约。一起花10个小时做评估(除了辅导时间)。如果你不打算花这段时间一起工作-选择自己完成评估。双方都必须付出同等的努力,否则这个小组就会被导师解散。

Your code will be assessed against the learning outcomes below using techniques taught in the subject.

您的代码将使用本主题中教授的技术,根据以下学习结果进行评估。

LEARNING OUTCOMES

学习成果

  1. Demonstrate a working knowledge of lists in Java.

    展示Java中列表的工作知识。

  2. Judge if a solution is well-designed.

    判断解决方案是否设计良好。

  3. Design a good OO solution from a specification.

    根据规范设计一个好的OO解决方案。

  4. Use inheritance in Java.

    使用Java中的继承。

BRIEF

This is a take home assessment to evaluate your understanding of object oriented concepts taught so far in IAPP001. The assessment will be composed of three (4) parts: the scenario, the design, the code and explanation (including proof of testing).

这是一个带回家的评估,用来评估你对IAPP001中迄今为止所教授的面向对象概念的理解。评估将由三(4)部分组成:场景、设计、代码和解释(包括测试证明)。

All code must compile and run in BlueJ version 4.1.2 to be marked.

所有代码必须在BlueJ 4.1.2版本中编译和运行才能被标记。

The scenario: (200 words)

情景:(200字)

You will decide on the topic for your project. You should choose a business for example, a café.

你将决定你项目的主题。你应该选择一个行业,比如咖啡馆。

You will write the basic usecases for the business, including identifying the major functionality the application must provide. At a minimum, your scenario needs to add objects to collections, retrieve a specific object from a collection (using list lookup) and display all objects in each collection.

您将为业务编写基本用例,包括确定应用程序必须提供的主要功能。至少,您的场景需要向集合中添加对象,从集合中检索特定对象(使用列表查找),并显示每个集合中的所有对象。

The design: (200 words)

You will create a simplified class diagram for your application, which shows the attributes/methods for each class and the inheritance. You should aim to have between 6 and 8 classes for your application. The classes should be: Main/driver class, parent class (at least 1), enum, child classes (at least 2), group class (at least 1).

您将为您的应用程序创建一个简化的类图,其中显示每个类和继承的属性/方法。您的应用程序应该有6到8个类。这些类应该是:主/驱动类,父类(至少1个),enum,子类(至少2个),组类(至少1个)。

You will explain how your design will provide the needed functionality for the application.

您将解释您的设计将如何为应用程序提供所需的功能。

The code:

You will write the code for the application using the design. Make sure you follow the guidelines setout in the subject eg use camelCase for objects, LetterCase for classes, all classes have toString(). Public mutators should be used sparingly etc

您将使用该设计为应用程序编写代码。确保您遵循主题中设置的指导方针,例如使用camelCase对象,LetterCase类,所有类都有toString()。应该谨慎使用公共mutator等

Your solution will need to use either interface or implementation inheritance (or both); overloading, overriding, menus with recursion and for each loops.

您的解决方案将需要使用接口或实现继承(或两者);重载、重写、递归菜单和for每个循环。

The explanation: (300 words)

解释:(300字)

You will explain the code you wrote and any problems you encountered and how you fixed them. At minimum you need to identify :

你要解释你写的代码,你遇到的任何问题,以及你是如何解决它们的。至少你需要确定:

You also need to include at least 1 screen shot of your code being testing on the object bench.

您还需要包含至少一个在对象工作台上测试代码的屏幕截图。

Please double check your code compiles and your submission document contains the updated version of all code prior to submission.

请在提交之前再次检查代码编译和提交文件中是否包含所有代码的更新版本。

SUBMISSION

You will submit your assessment in MS Word document format – yourName-studNo.doc.

您将以MS Word文档格式提交您的评估-您的姓名- studno .doc。

(You should also submit a copy of your blueJ project as a zip file)

(您还应该以zip文件的形式提交blueJ项目的副本)

The document will have 4 sections:

该文件将包含4个部分:

The deadline for submission of this project is Friday 11:59pm in week 8.

这个项目的提交截止日期是第八周周五晚上11:59。

Draft Project idea: due Friday 11:59pm Week 6 for tutor approval

项目草稿:第六周周五晚上11:59交导师批准

Draft Project A: due Tutorial B Week 7 – draft code review by tutor

项目草案A:交教程B第7周-由导师审查代码草案

All projects submitted after the deadline will incur late penalties of 1 grade band every 2 days (or part thereof).

所有在截止日期后提交的项目将每2天(或部分时间)被罚1个等级。

REMINDER: ALL of the code must be your own unique work using concepts and techniques taught in the subject to satisfy academic integrity.

提醒:所有的代码必须是你自己独特的工作,使用的概念和技术,在学科教授,以满足学术诚信

However, you may use In, Record & Records classes – indeed - it is strongly advised that you incorporate these classes into your solution.

但是,您可以使用In, Record & Records类-确实-强烈建议您将这些类合并到您的解决方案中

场景描述「200字」

选择一个咖啡馆作为项目主题,咖啡馆里有各种各样的咖啡和食物。

用户可以选择需要的食物和饮料并为其支付。我们的程序包含:添加商品订单、查询特定的商品以及显示所有的可用的商品。

设计描述「200字」

程序包含以下类别:

  1. Main:主程序类;
  2. Product:产品的父类,属性包括价格、名称等;
  3. Drink 和 Food 是 Product 的子类。
    1. 例如:Drink 可以有额外的“冷热”。
  4. ProductType:枚举类,区分饮料和食物。
  5. Order:订单类,其中包含一个商品列表;
  6. Cafe:包含所有订单和商品的集合。

设计的目的是为了将饮料和食物统一处理,同时方便扩展到其他类型的商品,如甜点等。

代码:

这部分需要按照上面的设计,实际编写 Java 代码。

解释「300字」

在项目开发过程中,我使用了以下面向对象概念:

在开发过程中遇到的问题包括如何有效的查询特定的商品以及如何组织订单。通过使用列表和循环,以及利用 Java 的集合库,我们成功解决了这些问题。

截图略......

提交之前,确保在 blueJ 版本上正确编译运行。

代码

Product.java (产品父类)

所有的 arraylist 改成 linkedlist:

以下是修改后的代码,将所有的 ArrayList 改为 LinkedList

  1. Product.java, Drink.java, Food.java, 和 ProductType.java 的代码可以保持不变,因为这些类中并没有使用到 ArrayList

  2. Order.java:

code 1
  1. Main.java 的代码可以保持不变,因为该类中并没有直接使用到 ArrayList

通过上述更改,已经将所有的 ArrayList 修改为了 LinkedList


我将在 Main 类中添加一个命令行交互功能,并为咖啡馆提供一个类似菜单的界面,允许用户进行选择。下面是代码的更新部分。

Main.java

这个命令行交互功能使用户可以:

  1. 显示所有可用的商品。
  2. 添加新商品。
  3. 创建新订单并向其中添加商品。
  4. 退出程序。

这个程序仅仅是一个简单的命令行应用,实际生产中的应用通常需要更复杂的错误处理和用户交互机制。

公众号:AI悦创【二维码】

AI悦创·编程一对一

AI悦创·推出辅导班啦,包括「Python 语言辅导班、C++ 辅导班、java 辅导班、算法/数据结构辅导班、少儿编程、pygame 游戏开发、Web、Linux」,全部都是一对一教学:一对一辅导 + 一对一答疑 + 布置作业 + 项目实践等。当然,还有线下线上摄影课程、Photoshop、Premiere 一对一教学、QQ、微信在线,随时响应!微信:Jiabcdefh

C++ 信息奥赛题解,长期更新!长期招收一对一中小学信息奥赛集训,莆田、厦门地区有机会线下上门,其他地区线上。微信:Jiabcdefh

方法一:QQ

方法二:微信:Jiabcdefh

你认为这篇文章怎么样?
  • 0
  • 0
  • 0
  • 0
  • 0
  • 0
评论
  • 按正序
  • 按倒序
  • 按热度
通知
关于编程私教&加密文章