FIT1051 Assessment Four Submission deadline: Sunday 26th January 2025 11:55pm MYT via Moodle Weight: This assessment is worth 38% of the unit total. Submission of your code is worth 50% of this total, and your interview component (held online in the following week) is worth 50%. Late Penalty: 5% mark deduction per day Instructions: Below are the coding tasks that you need to complete for Assessment 4. Your work and your submission should be independent. Given the flexible nature of this assignment regarding classes etc., there is no ZIP file to download. Please design your solution with the appropriate .java files, and ZIP up the project and submit to Moodle upon completion. Academic Integrity: Please be reminded of the academic integrity standards that are expected of you at Monash, which were mentioned in Week 1. You should code alone and ask the unit staff for help if needed. Do not post your code in public forums or send your code to anyone. Do not copy/paste code from other sources and present it as your own — this includes use of generative AI tools. Breaching these academic integrity requirements can incur serious penalties. You are very much encouraged to undertake your own research to complete this assignment. However, if your code uses techniques that have not been covered in this course and you cannot explain them adequately in your interview, you will be at risk of failing the assignment.
Scenario: You are required to design a system for an airline called BunnyAirways. It offers three classes of tickets: Economy, Business, and First Class, and also includes a loyalty program for customers. Customers receive loyalty points for each flight. • Economy: - 15 points per flight. • Business: - 30 points per flight. • First Class: - 50 points per flight. The fare for business class is 2x the fare of economy class. The fare for first class is 4x the fare of economy class.
You are to code the system for the airlines. When first run, it should present the user with a menu that has the following options: 1. Register a new customer. 2. Add a new flight to the system 3. Book a flight ticket 4. View all bookings and earned points for a specific customer. 5. Generate a daily report showing total bookings, revenue, and remaining seats per flight. 6. Generate a monthly report summarizing total passengers flown and total revenue. 7. Exit the program. This menu should continue running in a loop until Option 7 is selected by the user. The Airline System holds the following details about each customer: • A unique ID which is generated by the system • The customer's name • The customer's email address The system holds the following details about each flight: • A flight ID which is generated by the system • Route • Fare • Total Seats • Available Seats
The system holds the following details about each ticket: • A unique ticket ID which is generated by the system • Customer reference • Flight class type For full marks, your design should contain all the following: • Inheritance and the use of an Abstract class. You can also consider the use of an interface if appropriate. • At least one enum type, used for an appropriate purpose (you can use more than one if you like, but you are only required to use one). • At least six classes overall (including any abstract classes or interface)
Code marking rubric: Code design and correctness (50 marks total) 1. Program functionality (25 marks) • Implementing overall main menu structure correctly • Adding a new customer correctly to the system • Adding a new flight to the system • Adding a new booking • View booking and earned points for a specific customer • Generate a daily report showing total bookings, revenue, and remaining seats per flight. • Generate a monthly report summarizing total passengers flown and total revenue. 2. Design requirements (20 marks) • Sensible overall class design and adherence to good design principles • Modularisation of complex tasks within classes • Validation checks on user input • Appropriate and correct use of inheritance (including abstract) • Appropriate and correct use of enum type 3. Adherence to coding standards (5 marks) • All code written should adhere to the guidelines set out in the FIT1051 Coding Standards.
Suggestions for Implementation: This is the biggest program you will have written for the unit! Make sure you approach it in a way that lets you tackle it bit by bit (i.e. problem decomposition). Suggested strategies include: • Coding classes that do not rely on any other class first, and doing simple testing of them. • Coding a simple menu and being able to make that work (and exit appropriately). • Considering how menu items align with methods you write (and again how you break up the problem) and writing those, one menu item at a time, in order of complexity. Do it bit by bit, breaking it up into logical chunks. And test… test… TEST!
Submission Instructions: Please submit your IntelliJ project folder as a .zip file and submit to the Assessment 4 link on the Moodle Assessments page as shown below. If you are not sure how to zip your project, please refer to the video here. MAKE SURE YOU DOWNLOAD FROM MOODLE AFTER THAT TO CHECK IT IS THE RIGHT SUBMISSION! Interview component: You will be asked to demonstrate your program at an interview in Week 15, following the code submission date. You will be contacted by EMAIL to book an online interview time. The interview will be up to 15 minutes in length, and consist of 6 questions. You may be asked to explain your code, your program designs, to modify your code, to discuss your coding decisions, or to explain the any of the coding concepts taught in Weeks 1-12 that this Assessment covers. Not being able to explain key design decisions or important Java syntax may result in failing the assessment. Interviews will take place online via Zoom. You must have access to a stable internet connection and a working webcam, and your webcam must be switched on for the duration of the interview. It is your responsibility to make yourself available for an interview time during Week 15, and to attend your online interview on time. The interview is worth 50% of your assessment mark, and any student who does not attend an interview will receive a fail grade for the assignment. Your interview must take place before the end of Week 15. If you cannot attend your interview or miss your scheduled time, you MUST apply for Special Consideration
相关推荐
手把手教你用三极管搭建麦克风音频放大电路(附完整电路图)
本文详细介绍了如何使用三极管搭建麦克风音频放大电路,包括电路设计基础、元件选择、完整电路图及分步焊接指南。通过实际操作和调试技巧,帮助电子爱好者和学生深入理解模拟电路原理,实现音质清晰的音频放大效果。
InnoDB 内存结构总览:Change Buffer、AHI 与 Log Buffer
本文系统梳理InnoDB内存结构中的ChangeBuffer、Adaptive Hash Index(AHI)与LogBuffer。ChangeBuffer缓存二级索引页不在内存时的变更,减少随机IO,仅在页加载时合并;聚簇索引修改立即执行,因数据本身不可延后。AHI基于高频等值查询自动构建哈希索引,加速定位,仅支持等值操作。LogBuffer为redo log内存缓冲,配合磁盘日志实现崩溃恢复。三者均服务于性能优化,其中ChangeBuffer与AHI共享BufferPool空间,而LogBuffer独立
如何运用好DeepSeek为自己服务:智能增强的范式革命 || 目录
1.1 认知增强的三次浪潮1.2 DeepSeek认知增强模型1.3 人机认知耦合协议1.4 认知增强的数学基础。
信创环境下PageOffice文档控件适配与实践
信创适配做到文档控件这一层,拼的已经不是"有没有国产版本",而是同一个功能在两类终端上是否真的等价。等价的标准很具体:同一次点击能得到同样的结果,同一份公文能得到同样的版式,同一个项目不需要维护两套代码。这背后是三件并不轻松的工作:服务端用一套接口同时支撑两类终端,客户端把两种系统与四种芯片的安装包分发清楚,文档内核层由产品侧跟着 WPS 的版本走。浏览器这一层的压力,则被收进了产品自己的窗口里——升级节奏由产品掌握,不再交给运气。
Linux系统搭建OpenClaw(原Clawdbot)全流程指南 最新版
工具定位:开源个人 AI 助手,支持文件读取、命令执行、多渠道交互(Telegram / 本地终端等);系统要求:主流 Linux 发行版(Ubuntu/Debian/CentOS 等),Node.js ≥22(核心依赖);安全提示:OpenClaw 为测试版,具备高权限操作能力,建议使用非主力机,配置权限白名单,避免接触敏感数据。
从芯片选型到光学集成:手持激光测距仪硬件设计全解析
本文全面解析手持激光测距仪的硬件设计,从芯片选型到光学集成,详细介绍了相位法测距技术的核心原理与方案选择。通过模块化设计、信号链路优化及PCB布局技巧,实现毫米级精度。文章还分享了量产化关键控制点,帮助工程师规避常见设计陷阱,提升产品可靠性。
第三篇 第 6 课
前置:第三篇第 1 课(stdx 引入),第二篇第 1 课(std.regex)。环境:仓颉 SDK 1.2.0。本文所有代码与输出均逐行实测。
多目标优化NSGA-II(快速精英非支配排序遗传算法)及python实现
文章目录前言一、什么是NSGA-II?二、学习NSGA-II1.快速非支配排序算法2.密度估计3.拥挤比较算子4.主循环5.代码6.总结 前言 NSGA-II适用于复杂的多目标优化问题,是K-Deb教授在2000年在一篇paper《MOEAs — A fast and elitist multi-objective genetic algorithm: nsga2》提出。 Keywords: optimization; multi-objective evolutionary algorithm; no
【从零理解 Spring AI · 12】MCP 的两种角色:做客户端还是做服务端
上一篇讲了 MCP 的概念:标准协议、三大角色、M+N 替代 M×N。
【虚幻引擎UE】UE5 仅需6步轻松实现关卡顺滑切换
【虚幻引擎UE】UE5 仅需6步轻松实现关卡切换
智能车浅谈 电磁组——环岛处理
第十七届全国大学生智能车电磁四轮部分经验分享
pcl2启动器下载(Minecraft PCL2 启动器 最新版 安装与使用说明)
摘要:PCL2(Plain Craft Launcher 2)是一款面向 Minecraft 的第三方启动器,支持正式版与快照版本管理、模组与整合包安装、Java 运行时自动匹配,绿色免安装、双击即可运行。适合在 Windows 上玩单机整合包、需要多版本共存或离线启动的用户使用
【Envi风暴】Envi5.6安装图文教程(附Envi5.6完整版下载)
【Envi风暴】Envi5.6与应用商店app store安装图文教程(附Envi5.6完整版下载)从文末网盘下载完整的ENVI5.6安装包,如下所示:双击envi56-win.exe,开始安装。将f__x64下的两个补丁文件拷贝到安装路径。将f__x86下的两个补丁文件拷贝到安装路径。
spring boot 4集成SQLLite,及其SQLLite的建库
spring boot 4集成SQLLite,及其SQLLite的建库
贝叶斯统计 [韦来生编]
贝叶斯(Bayes)统计是近几十年来迅速发展起来的数理统计的一个重要分支。贝叶斯方法与经典统计方法的主要不同之处是进行统计推断时除了利用样本信息外,还要利用参数的先验信息,因此可以提高统计推断或统计决策的效果。它在经济、金融、生物、医学、自然科学和社会科学等许多领域具有广泛的应用。贝叶斯方法的研究已渗透到了统计学的几乎所有领域。作者在给中国科学技术大学概率论与数理统计专业本科生开设的“数理统计”课程中有一章专门讲授“贝叶斯方法和统计决策理论”,近十年来也给中国科学技术大学概率统计专业研究生开设过几次“贝叶斯分析”课。本书是在对过去讲稿的内容作了适当的增减和调整的基础上完成的。 本书共分六章。第1章是绪论,介绍了贝叶斯统计的若干基本概念,同时对必要的数理统计的基础知识有重点地作了回顾。第二章介绍了确定先验分布的若干可供选择的方法。第三章介绍了几类常见统计模型参数的后验分布的主要结果和计算方法。第四章和第五章分别介绍了“贝叶斯统计推断”和“贝叶斯统计决策”的内容。第六章介绍了贝叶斯统计计算的若干方法,包括蒙特卡洛方法和马尔可夫链蒙特卡洛(MCMC)方法以及相关统计软件的简介。本书的每一章附右大量的例题和习题,书末附有常用的几个表格和部分习题解答供读者查用。 大约可在54学时内讲授本书的第1章至第六章的主要内容,教师可根据学时需要选讲本书第1章至第六章的部分内容。书中标“*”号的章节可略去不讲,留给读者作为阅读材料。第六章例题中的R代码和部分例题的数据文件等可从作者个人主页下载。 作者在编写本书的过程中参考了J.O.Berger教授的《统计决策论及贝叶斯分析》和茆诗松教授编写的《贝叶斯统计》等书中的一些内容,以及《贝叶斯分析》一书中由张伟平博士编写的有关贝叶斯统计计算的一些内容。在此表示衷心感谢。 本书编写准备过程中,中国科学技术大学统计与金融系的几个研究生帮助完成了本书部分中文的录入和排版,作者对他们的辛勤工作表示真诚的感谢。高等教育出版社为本书的出版给予了大力支持。在此一并致谢。
精雕软件(JDpaint) 5.5 绿色版
精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版
Java 集合容器高频面试题全解:HashMap 树化阈值、1.7 死循环与 ConcurrentHashMap 演进(2026 招聘 JD 真题复盘)
HashMap 树化阈值 8 的泊松分布依据、退化阈值 6 的防抖设计、JDK 1.7 头插成环死循环的排查与修复、1.8 尾插后为何仍线程不安全、ConcurrentHashMap 放弃分段锁的原因与 ForwardingNode 协作扩容、computeIfAbsent 死锁陷阱、大集合找重复的场景题选型,附三层追问链自测。题目来源为 38 期公开招聘 JD 样本与字节、拼多多、建行、美团、快手公开面经。
pscad IEEE标准系统搭建说明
pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。
spdlog 同步日志库使用详解
spdlog是一个轻量级 C++ 日志库,支持同步日志、异步日志、多线程日志、日志文件轮转和自定义日志格式。对于嵌入式 Linux 应用开发,我建议先使用。它可以帮我们完成:日志级别过滤。时间戳和线程 ID 输出。日志格式化。终端和文件输出。多线程安全写入。日志文件按大小或时间轮转。我们不需要自己实现互斥锁、文件写入、日志格式化和轮转等底层功能。
RU DOS版、EFI版32bit/64bit BIOS常用工具
DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。
JavaSE通关手册:数据类型与变量
代码无需额外处理,编译时编译器自动完成转换。
IDEA 简介:从零认识 IntelliJ IDEA
IDEA 全称,是由 JetBrains 公司开发的一款主流 Java 集成开发环境(IDE)。它集代码编辑、编译、调试、测试、版本控制、构建管理等功能于一体,被大量 Java 开发者视为日常开发的首选工具。所谓 IDE(Integrated Development Environment,集成开发环境),就是把写代码所需的各类工具整合到同一个界面中。相比只用文本编辑器加命令行编译,IDE 能显著减少重复操作,让开发者把精力集中在业务逻辑上。
Docker部署linkding:HTTPS与数据备份
部署私人书签库,除了让页面能够打开,还需要考虑几个实际问题:重建容器后数据是否保留、登录和保存是否正常、升级前怎样备份,以及出现 502 或 CSRF 错误时从哪里检查。本文使用 Docker Compose 部署 linkding,采用默认 SQLite 数据库,通过 Caddy 提供 HTTPS,并完成账户创建、数据持久化验证和备份。如果重建后账户或书签消失,应先检查是否换了项目目录、改了挂载路径,或者启动了另一套实例,不要急着重新初始化。遇到权限问题,应根据日志确认具体目录和运行用户,再调整权限。
动态代理两大流派:JDK 代理与子类代理
业务类想加日志,最直白的写法是侵入式修改: 问题很明显:每个方法都要改一遍,改一个业务要动十处。代理模式的解法是:调用方不直接依赖 ,而是依赖一个代理对象。代理对象长得跟目标一模一样,调用它 → 代理先执行增强逻辑 → 再转调真实对象。 关键在于:代理对象的类型是哪来的?这就是"动态"二字的含义:代理类在运行时才诞生。两个角色: 承载增强逻辑, 负责生成代理类。 组装代理并调用: 输出: 业务代码 一行没动,增强逻辑全在 里。这就是 AOP 的味道。 内部四步: 第 2 步 内部:先查 (同一个接口
C++20协程怎么运行?原理与三大核心组件深度剖析
C++20协程是轻量级的无栈状态机,通过co_await、co_yield、co_return实现挂起与恢复,由Promise、协程句柄和Awaitable三大组件协同工作。协程与线程互补,适用于高效管理大量并发I/O任务,显著降低上下文切换开销。其核心在于编译器生成的状态机机制,需配合库(如cppcoro)使用。掌握Promise控制逻辑、句柄生命周期管理及Awaitable语义,是构建高性能异步程序的基础。
c++ explicit关键字详解
explicit。
Teamcenter Java SOA 开发:连接、查询与保存
本文介绍如何通过 Java 调用 Teamcenter SOA 接口实现外部系统对接,涵盖连接登录、查询保存等核心操作。以最小闭环示例展示 Connection、Service、ModelObject 等关键组件的使用,强调错误处理与事务管理要点。梳理了 DataManagement、Query、File Management 等 API 模块分工,并结合“工作移交WebService”案例,说明幂等性设计与流程状态返回的重要性。适用于 Web 门户、ERP 集成等场景,建议批量操作用 bulk 接口优化性
Java 项目实战:交友项目后台系统——网关统一鉴权与 B 端管理后台
本次改造通过引入SpringCloud Gateway实现网关统一鉴权与路由,新建mf-admin管理端复用C端域服务(Dubbo调用),实现管理员登录与用户管理四件查询。核心套路:网关白名单+双体系JWT(同工具不同payload)、管理端零直连业务库、分页形态区分(MySQL自动count/Mongo手动count)、浏览器端独立聚合。踩坑12条,附自检清单与后续改造方向,可复用于多角色后台系统。
TRingBuffer两端都能增删(快递站版)
TRingBuffer 是一个支持两端增删、下标访问且容量动态增长的环形双端队列。它通过无符号索引的永不归零设计,利用减法自动模运算实现空满判断与元素计数,避免了传统环形缓冲浪费格子的问题。内部以票号(索引)标记首尾,扩容时重排元素为连续存储,保证 O(1) 操作与高缓存效率。虽不线程安全,但其高效性使其成为游戏开发中事件队列、命令缓冲等场景的理想选择。
Mac上装了最新版本的Android Studio,但是没找到jdk的设置选项也没找到jbr的目录
新版Android Studio(2025.3.1+)因三项变更导致常见问题:一、JDK设置移至“DaemonJVM criteria”,新项目默认自动探测或下载JDK;二、JBR目录改名为带版本号的jbr-21等,需进入.app/Contents/查看,或通过About窗口确认运行时;三、命令行缺adb因platform-tools未加入PATH,需在SDK Manager中勾选并配置~/.zshrc中的ANDROID_HOME及PATH。重装或清理残留可解决缺失问题,切勿手动设JAVA_HOME或安装冲
988



被折叠的 条评论
为什么被折叠?



