南澳大学coursework GymClass健身房管理系统

GymClass健身房管理系统

wechat: help- assignment

Rationale
The purpose of this assessment is to test your ability to:
• Apply object-oriented programming principles to solve intermediate problems
• Distinguish between and use advanced collection classes
• Apply various inbuilt mechanisms within the programming languages to handle concurrency and various forms of input and output
Your work will demonstrate your learning over the first two modules of this unit.
Task Description
In this assignment, you will write the code that could form part of a management system for a gym.
To get started:
• Create a new Java project called username-A2 in IntelliJ.
• In the src directory, create five classes called:
基本原理
此评估的目的是测试您的能力:
·应用面向对象编程原理解决中间问题
·区分和使用高级收藏类别
·应用程序设计语言中的各种内置机制来处理并发和各种形式的输入输出
您的工作将展示您对本单元前两个模块的学习情况。
任务说明
在本作业中,您将编写可构成健身房管理系统一部分的代码。
要开始,请执行以下操作:
·在IntelliJ中创建一个名为username-A2的新Java项目。
·在src目录中,创建五个类,分别名为:

In the GymClass class:

• Add at least 3 instance variables suitable for a GymClass. One of these instance variables must be of type Staff, i.e. used to track the trainer running the GymClass.
• Add a default constructor and a second constructor that sets the instance variables using parameters.
• Add getters and setters for all GymClass instance variables.
In the AssessmentTwo class add the following code:
public class AssessmentTwo {
public static void main(String[] args) { }
public void partOne(){
}
public void partTwo(){
}
public void partThree(){
}
public void partFour(){
}
public void partFive(){
}
public void partSix(){
}
}
Module 3 - Advanced Collections
The following part of the assessment covers the content in Module 3.
Part 1 – Lists
The GymClass class is missing the ability to store a collection of Members who have signed up for the GymClass. For this part of the assignment:
• Using a LinkedList, update GymClass so that a GymClass object can store a collection of Members (i.e. datatype Member) who have signed up for the
GymClass.
Assessment Brief
4
In addition to adding a LinkedList, you need to add the following methods to GymClass that work with the LinkedList:
• A method to add a Member to the GymClass.
• A method to check if a Member is in the GymClass.
• A method to remove a Member from the GymClass.
• A method that returns the number of Members in the GymClass.
• A method that prints the details of all Members signed up for the GymClass (you must use an Iterator or you will get no marks).
Note: Make sure all the above methods print suitable success/failure messages. Demonstration
In the partOne method in the AssessmentTwo class:
• Create a new GymClass object.
• Using the methods you created:
o Add a minimum of 5 Members to the LinkedList. o Check if a Member is in the LinkedList.
o Remove a Member from the LinkedList.
o Print the number of Members in the LinkedList. o Print all Members in the LinkedList.
Part 2 – Collection Class
There is no way to sort the Members who have signed up for a GymClass. For this part of the assignment:
• Create a class (you can choose the name) that implements the Comparator interface. When you implement the compare method from the Comparator interface, you must use a minimum of two of the instance variables in your comparison.
• Create a method in the GymClass class that sorts the LinkedList using the sort(List list, Comparator c) method in the Collections class. Note: You MUST use the Comparator interface. You CAN NOT use the Comparable interface.
在 GymClass 课程中:
• 添加至少 3 个适合 GymClass 的实例变量。其中一个实例变量必须是 Staff 类型,即用于跟踪运行 GymClass 的培训师。
• 添加一个默认构造函数和第二个使用参数设置实例变量的构造函数。
• 为所有 GymClass 实例变量添加 getter 和 setter。
在 AssessmentTwo 类中,添加以下代码:
公共类 AssessmentTwo {
public static void main(String[] args) { }
公共无效 partOne(){
}
公共无效 partTwo(){
}
公共无效 partThree(){
}
公共无效 partFour(){
}
public void partFive(){
}
公共无效 partSix(){
}
}
模块 3 - 高级馆藏
评估的以下部分涵盖模块 3 中的内容。
第 1 部分 – 列表
GymClass 课程无法存储已注册 GymClass 的成员集合。对于这部分作业:
• 使用 LinkedList 更新 GymClass,以便 GymClass 对象可以存储已注册
体育课。
评估简介
4
除了添加 LinkedList 之外,还需要将以下处理 LinkedList 的方法添加到 GymClass 中:
• 将成员添加到 GymClass 的方法。
• 检查会员是否在 GymClass 中的方法。
• 一种从 GymClass 中删除成员的方法。
• 返回 GymClass 中成员数的方法。
• 一种打印所有注册 GymClass 的成员的详细信息的方法(您必须使用迭代器,否则您将得不到任何分数)。
注意:确保上述所有方法都打印合适的成功/失败消息。示范
在 AssessmentTwo 类的 partOne 方法中:
• 创建新的 GymClass 对象。
• 使用您创建的方法:
o 向 LinkedList 添加至少 5 个成员。o 检查成员是否在 LinkedList 中。
o 从 LinkedList 中删除成员。
o 打印 LinkedList 中的成员数。o 打印 LinkedList 中的所有成员。
第 2 部分 – 集合类
无法对已注册 GymClass 的会员进行排序。对于这部分作业:
• 创建一个实现 Comparator 接口的类(您可以选择名称)。从 Comparator 接口实现 compare 方法时,必须在比较中至少使用两个实例变量。
• 在 GymClass 类中创建一个方法,该方法使用 Collections 类中的 sort(List list, Comparator c) 方法对 LinkedList 进行排序。 注意:必须使用比较器接口。您不能使用可比较的界面。

help-assignment contact me

  • 17
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值