Assignment -1 Spring 2024 1
Faculty of Engineering and Information Technology
School of Computer Science
31927 – Application Development with .NET
32998 - .NET Application Development
SPRING 2024
ASSIGNMENT 1 – SPECIFICATION
Due date Monday 23 September 2024, 11:00am
Demonstration Required in the lab/tutorial session
Weight 35%
Groupwork Individual
Submission Complete project folder zip
Submit to Canvas
Summary
In this assignment, you are required to model the dotnet Hospital Management System by developing a
console application using C#.
The application should have appropriate data structures to distinguish between a Doctor, Administrator and
Patient as well as store the necessary links between them (such as an appointment, between a Doctor and
a Patient). You are given complete control in how you create these data structures, but guidance has been
given overpage.
Objects should be stored in the system and also written to .txt files such that the system can read them in
and regenerate existing objects on load. This is mandatory.
Students will need to submit the complete project folder in zip format, which will have the complete C#
code, solution file, data file, etc. required to run/test the program. Any special instructions required to run
the code has to be provided in a text file. Submitting a lone “.exe” is not acceptable.
Assignment Objectives:
The purpose of this assignment is to demonstrate competence in the following skills:
• Ensure firm understanding of the .NET framework, C# basics and C# syntax
• Understand how the .NET framework implements OO concepts and the implications this has for
new language design
• Array and string manipulation
• Creating custom classes and methods in C#
• File reading, writing and manipulation in C#
• Creating interactive console applications
• Creating good OO design.
Program and data structures:
• How you structure the classes in your program is your choice. One thing you are not allowed to do
is make your program fully contained inside Program.cs, or any single class.
• In the dotnet Hospital Management System, a user can log in as either a Patient, a Doctor, or an
administrator. These are different roles, which would store different information, and would have a
different menu. Your code structure should reflect this. Assignment -1 Spring 2024 2
• Additionally, your code will need to generate Appointments. An appointment would need a reference
to a single Doctor and a single Patient; your code structure should reflect this. You do not need to
manage Dates/times for appointments (or anywhere, for that matter) in your code. This may result in
appointments being difficult to distinguish and sort; you will not be marked down for this.
• Every patient, doctor and admin, has a unique ID. This ID should be an integer of reasonable length
(5-8 digits). This can be randomly generated, or incremental, but it should be generated by the
system on object creation, not chosen/inputted by the user.
Further recommendations:
• Objects will need to be printed out one by one, it’s recommended that each data structure has a
toString() function which compresses the notable data of the class into a succinct line.
• Each role should be its own class and it should have its own MainMenu method, don’t try and create
separate versions of the menu in Program.cs.
• Don’t get confused by Administrators. Doctors and Patients can’t at any stage have “admin
privileges”; the administrator is a completely separate entity.
• You may find it useful to abstract common functionality into its own class, such as a FileManager
class with static read and write methods or a Utils class which contains the methods to generate
ID’s and filter lists.
Assignment -1 Spring 2024 3
Marking Guide
Below is the marking guide for this assessment. It is designed to allow you to get a Pass grade with
minimal effort while still demonstrating that you understand the core principles of .NET development, to get
a Distinction with reasonable effort, and to get a High Distinction with solid effort, and 100% with
considerable effort. It is recommended that you pay attention to the grade distribution and work towards
your own skill level.
In the demos in the lab, your code needs to be compiled in Visual Studio Community edition 2022 and then
the tutor will test for normal functionality as described in the descriptions above. If your code does not
compile you will receive zero marks (no exceptions).
Task Items Max
Point Total
Console Code and
Design
- Appropriate Headings for menus
- Basic console design 2
14
- Helpful comments
- Appropriate indenting and whitespacing
- Consistent and appropriate C# naming convention used
2
OOP principles used:
- At least 1 example of inheritance
- At least 1 example of method overloading is used
- At least 1 example of method overriding is used
- At least 1 example of constructor
- At least 1 example of extension method
- At least 1 example of garbage collection
6
Appropriate use of exception handling 2
Low coupling, high cohesion, general code quality 2
Login Menu Functionality including cross checking credentials with .txt file 1.5 3 Password input masked in console 1.5
Patient Menu
List Patient Details 1
5
List My Doctor Details 1
List All Appointments 1
Book Appointment, functionality including creating
Appointment object and writing to txt file 2
Doctor Menu
List Doctor Details 1
5
List Patients 1
List Appointments 1
Check Particular Patient 1
List Appointments With Patient 1
Admin Menu
List All Doctors 1
7
Check Doctor Details 1
List All Patients 1
Check Patient Details 1
Add Doctor 1.5
Add Patient 1.5
Logout/Exit Logout functionality and Exit functionality for all 3 menus 1 1
Maximum Full Marks 35
Bonus Marks
- Use of one example of anonymous method
- Use of one example of generic
- Use of one example delegates
3
5 Email functionality (e.g. confirmation of patient registration, or
confirmation of booking) 1
Additional user role (e.g. receptionist) 1 Assignment -1 Spring 2024 4
Assignment -1 Spring 2024 5
Specific expected tasks and examples
In this assignment, you are required to develop a console-based, menu driven hospital management
system using C#. Necessary data should be stored in “.txt” files. There are 3 core roles in the system.
1. Patient
2. Doctor
3. Administrator
Each of these roles have their own version of the menu with it’s own subset of menu options.
Login Menu
The user should be presented with this menu on program startup and cannot proceed further without
entering valid login details.
Input fields:
- ID: Display the typed characters as is
- Password: Display “*” instead of the actual
characters
ID and password should be checked against valid
credentials inside your files. How you do this depends
on how you’ve structured your classes; but any
patient/doctor or admin should have a unique ID and a
password. These values should be, in some way,
stored in a .txt file, which your code should cross check at this screen. If entered values are not valid,
display appropriate error message and allow the user to retry.
Patient Menu
The patient menu should have all of the following
menu options (see right).
All menu options MUST share this functionality
(see example below):
• Console is emptied to display new data
• Appropriate heading displayed before data
printed
• Error handling for bad user input
• Menu should never return itself, the user
should be able to press a single key to return.
List Patient Details
Functionality: Lists all the fields of the currently
logged in patient to the console.
Input: Key press to return to menu. Assignment
-1
Spring 202
4
6
List My
Doctor
Details
Functionality: Lists all the fields of the
doctor that is registered with the
currently logged in patient, to the
console.
It is recommended that the
Doctor
data structure has a toString
function which compresses the
necessary details of the patient into a
short line.
Input: Key press to return to menu.
List All Appointments
Functionality: Lists the details of all past
appointments involving the currently
logged in patient.
Input: Key press to return to menu.
Book Appointment
Functionality: Prompts the user for all
the necessary information to generate a
new appointment. This must be done
with the doctor registered to the user. If
the user has not registered to a doctor,
they should be prompted to choose from
a list of all doctors and register.
Input:
•
Integer to select doctor (if
applicable)
•
All necessary information to
generate your Doctor data
structure
•
Key press to return to menu.
Assignment
-1
Spring 202
4
7
Doctor Menu
The doctor
menu should have all of the
following menu options
(see right)
All menu
options
MUST share this
functionality:
•
Console is emptied to display new
data
•
Appropriate heading displayed
before data printed
•
Error handling for bad user input
•
Menu should never return itself, the
user should be able to press a
single key to return.
Logout
Functionality: Returns to the login menu
Exit
Functionality: Exits the application
List Doctor Details
Functionality: Lists the fields of the
currently logged in doctor to the
console
.
Input: Key press to return to menu.
List Patients
Functionality: Lists a shorthand outline
of every patient that is registered with
the currently logged in doctor to the
console, line by line. It is recommended
that the Patient data structure has a
toString function which compresses the
necessary details of the patient into a
short line.
Input: Key press to return
to menu.
Assignment -1 Spring 2024 8
List Appointments
Functionality: Lists every appointment
involving the currently logged in doctor,
regardless of which patient is involved, to
the console, line by line. It is
recommended that that the Appointment
data structure has a toString function
which compresses the necessary details
of the appointment into a short line.
Input: Key press to return to menu.
Check Particular Patient
Functionality: Prompts the user for an ID and prints the details of the patient whose ID it belongs to, to
the console line by line. If there is no patient with that ID, your code should handle the error and print
an appropriate error message. It is your choice whether the user is prompted to re-enter the ID or if the
program returns to the Patient menu.
Input: Key press to return to menu.
List Appointments With Patient
Functionality: Prompts the user for an
ID and finds the patient with that ID.
Your code should then print every
appointment between that patient and
the currently logged in doctor. (You
should not need to filter this list, as the
patient should have been forced to be
registered to only 1 doctor). If there is
no patient with that ID, your code
should handle the error and print an
appropriate error message. It is your
choice whether the user is prompted to
re-enter the ID or if the program returns
to the Patient menu.
Input: Key press to return to menu. Assignment -1 Spring 2024 9
Administrator menu
The administrator menu should have all of
the following menu options (see right)
All menu options MUST share this
functionality:
• Console is emptied to display new
data
• Appropriate heading displayed
before data printed
• Error handling for bad user input
• Menu should never return itself, the
user should be able to press a single
key to return.
List All Doctors
Functionality: Lists a shorthand version of every doctor contained in the system to the console, line by
line. It is recommended that the Doctor data structure has a toString function which compresses the
necessary details of the doctor into a short line.
Input: Key press to return to menu.
Logout
Functionality: Returns to the login menu
Exit
Functionality: Exits the application
Assignment -1 Spring 2024 10
Check Doctor Details
Functionality: Prompts the user for an ID and prints the details of the doctor whose ID it belongs to, to
the console line by line. If there is no doctor with that ID, your code should handle the error and print an
appropriate error message. It is your choice whether the user is prompted to re-enter the ID or if the
program returns to the Administrator menu.
Input: Key press to return to menu.
List All Patients
Functionality: Lists the shorthand version of every patient in the system to the console, line by line. It
is recommended that the Patient data structure has a toString function which compresses the
necessary details of the patient into a short line.
Input: Key press to return to menu.
Check Patient Details
Functionality: Prompts the user for an
ID and prints the details of the doctor
whose ID it belongs to, to the console
line by line. If there is no doctor with
that ID, your code should handle the
error and print an appropriate error
message. It is your choice whether the
user is prompted to re-enter the ID or if
the program returns to the
Administrator menu.
Input: Key press to return to menu. Assignment
-1
Spring 202
4
11
Add Patient
Functionality: Prompts the user for
all the necessary data needed to
generate a new Patient
and add it
to the system.
Input: Key press to return to menu.
Logout
Functionality: Returns to the login menu
Exit
Functionality: Exits the application
Add Doctor
Functionality: Prompts the user for
all the necessary data needed to
generate a new Doctor and add it
to the system.
Input: Key press to return to menu.
Assignment -1 Spring 2024 12
Additional Information:
Assignment Submission
You must upload a zip file of the C# solution to Canvas. This must be done by the Due Date. You may
submit as many times as you like until the due date. The final submission you make is the one that will be
marked. If you have not uploaded your zip file within 7 days of the Due Date, or it cannot be compiled and
run in the lab, then your assignment will receive a zero mark
• NOTE 1: It is your responsibility to make sure you have thoroughly tested your program to make
sure it is working correctly.
• NOTE 2: Your final submission to Canvas is the one that is marked. It does not matter if earlier
submissions were working; they will be ignored. Download your submission from Canvas and test it
thoroughly.
Queries
If you have a problem such as illness which will affect your assignment submission contact the subject
coordinator or lab tutor as soon as possible.
Dr. Avinash Singh
Room: CB11.07.115
Phone: 9514 1825
Email: avinash.singh@uts.edu.au
If you have a question about the assignment, please post it to the Canvas discussion board for this subject
so that everyone can see the response.
If serious problems are discovered in assignment specification the class will be informed via an
announcement on Canvas. It is your responsibility to make sure you frequently check Canvas.
PLEASE NOTE : If the answer to your questions can be found directly in any of the following
§ Subject outline
§ Assignment specification
§ Canvas FAQ and addendum
§ Canvas discussion board
You will be directed to these locations rather than given a direct answer.
Extensions and Special Consideration
Please refer to subject outline.
Academic Standards and Late Penalties
Please refer to subject outline.
相关推荐
Linux下开机异常(fsck exited with status code 4)
Linux下开机异常事情是这样的,本来我呢跑着程序听着歌,结果忽然就死机了,我只能强制关机,再次打开系统的时候,就提示这样fsck from util-linux 2.26.2 /dev/sda10 contains a file system with errors, check forced. /dev/sda10: Inodes that were part of a corrupted pr
31927 – Application Development with .NET 32998 - .NET Application Development SPRING 2024 ASSIGNMEN
Java Python 31927 – Application Development with .NET32998 - .NET Application DevelopmentSPRING 2024ASSIGNMENT 1 – SPECIFICATIONDue date Monday 23 September 2024, 11:00amDemonstration Required in the lab/tutorial sessionWeight
Xilinx Vitis arm-xilinx-eabi-gcc.exe: error: *.c: Invalid argument
This problem may be a bugof version 2021.1 only. Unfortunately, I'm just currently using this version. After Build Project: Find where this Makefile is through "make: Leaving directory" information. For me, it is located atZynq_CPU_wrapper_hw_platfo...
31927 – Application Development with .NET
31927 – Application Development with .NET32998 - .NET Application DevelopmentSPRING 2024ASSIGNMENT 1 – SPECIFICATIONDue date Monday 23 September 2024, 11:00amDemonstration Required in the lab/tutorial sessionWeight
ESP32 开发实战:VS Code 头文件波浪线及编译错误的终极解决方案
本文针对ESP32开发者在VS Code中常见的头文件红色波浪线和fatal error编译错误,提供了终极解决方案。通过详细讲解如何配置c_cpp_properties.json文件来修复编辑器智能提示,以及如何修改CMakeLists.txt来修正编译器路径,帮助开发者彻底解决环境配置问题,提升开发效率。
【Blockly开发教程】01 初识Blockly
Blockly 是由 Google 开发的开源代码库,它可以为网页程序和移动端应用程序添加可视化代码编辑器。
VMware 安装 SQL Server 双节点 AlwaysOn 可用性组教程 —— WSFC、AG 与侦听器完整部署(系列核心篇)
13_VMware 安装 SQL Server 双节点 AlwaysOn 可用性组教程 —— WSFC、AG 与侦听器完整部署(系列核心篇) 系列定位 :《SQL Server 数据库全栈运维实战系列》第 13 篇,与《MySQL 数据库全栈运维实战系列》同构对标(对标 MySQL 13 主从与 I…
Bartender 2021破解版安装教程:手把手教你从下载到激活(附详细步骤图)
本文详细介绍了BarTender 2021专业版的安装与高效应用指南,从基础配置到高级条码设计,帮助用户快速掌握标签设计与打印技术。内容涵盖安装步骤、标签模板创建、数据连接与批量打印技巧,以及高级功能如安全策略与自动化集成,适合零售、物流、制造等行业用户提升工作效率。
数据库优化不是只加索引:从 SQL、表结构到写入链路的完整取舍
上线之后,有的查询确实变快,但一段时间之后,写入接口越来越卡、有些 SQL 依旧不走索引、高峰时段锁等待堆积。同时,这条查询只需要 id、order_no、amount,还没有形成覆盖索引,依旧会回表。更新语句的过滤条件,必须能够命中索引,锁定尽可能少的行。有时候 SQL 明明有索引,explain 却看到优化器选择全表扫描,不是索引失效,是 MySQL 统计信息不准,优化器误判扫描行数。如果只有三个单列索引,MySQL 优化器只会选择其中一个索引,剩下的条件需要回表过滤,还需要文件排序,效率很低。
SpringBoot + MyBatis-Plus 高效实现数据变更记录:从注解到通用审计方案(附源码)
*** 数据变更审计插件* 拦截增删改操作,自动记录变更日志*/@Component@Resource/*** 拦截SQL执行*/@Override/*** 数据变更审计插件* 拦截增删改操作,自动记录变更日志/*** 拦截SQL执行。
十年芯片资深IC设计工程师面经系列(四)SDC约束
set_driving_cell:当我们的设计是模块级(Block level)的design时,我们的设计前面一般还有其他的设计,那么前面模块的输出便是我们模块的输入,5.1set_false_path:可以单独的时钟或者路径进行约束。set drive :当我们的设计是芯片级(Chip level)的顶层设计时,芯片外围电路要驱动的是负载较大的IO单元,故需要的驱动能力较强,:set_load 是指output端口的负载,设置的值会影响输出到端口的net上的电容,从而影响相应的路径延时。
嵌入式数据库横向对比:HSQLDB · Derby · DuckDB · SQLite · H2 · SQLTiny
SQLTiny 是用 C++20 从零实现的轻量嵌入式数据库,核心定位为支持 MySQL Wire Protocol 的多语言、可网络访问的嵌入式数据库。区别于 SQLite(文件锁)、DuckDB(列式分析)、HSQLDB/H2(私有协议),它以极简代码量(~15k LOC)和标准协议兼容,填补了“嵌入式 + 多语言直连 + TCP server”空白。虽当前性能受限于全局锁与无索引 JOIN,但其清晰架构与生态兼容性使其成为教学、原型开发及多语言项目中理想的 MySQL 替代品。
YOLOv8融合改进 更换检测头为Detect_DyHead同时添加C2f_DBB模块
yolov8独家训练测试融合网络结构,提供详细步骤详细代码,手把手教你在yolov8官方包中把检测头更换为Detect_DyHead检测头,并且将原始的C2f模块更换成C2f_DBB模块,提高检测精度,亲测在多个数据集上有涨点!!!!!
记一次Sql Server2012免费版如何升级到2016企业版本
本文记录了将SQL Server 2012免费版升级至企业版的完整流程,重点解决因版本限制导致无法使用代理功能的问题。通过加载ISO安装包,选择从旧版本升级,完成功能安装与实例配置后,需手动启用“代理XP”并检查服务状态。若代理仍异常,需通过安装程序添加“SQL Server代理”组件,最终实现企业版功能完整启用。
数学建模模型总结
这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!
LinePhone3.2.7(android端最新版本) sip客户端
SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/
SQL Server 基础语法详解:从建库建表到约束与增删改查
本文以学生信息表 Students 为主线,系统讲解数据库基础语法,涵盖建库、建表、约束添加及增删改查操作。通过 SQL Server T-SQL 示例,清晰区分数据库、表结构与记录的操作对象,强调字段类型、非空、自增、主键、唯一、检查与默认约束的定义与应用,帮助读者理清各语句间的逻辑关系,掌握数据库管理的核心技能。
锂电池充电器电路设计 里面有电路
锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。
PostgreSQL 日报| OAuth 校验库置空仍可登录(11 月 9 日)
Tomas Vondra 提交了针对 commit a798660ebe3 中"bogus parameterizations"漏洞的清理版修复补丁,并为各个回退分支分别提供了对应的版本。据报道,OpenAI 正在进行新一轮融资,已额外筹集 110 亿美元,整轮融资尚未正式收官,预计将在未来数周内完成。作为一款面向现代开发流程的 Serverless Postgres 数据库,Lakebase 支持即时分支与环境克隆,并通过计算与存储分离的架构提升性能、降低成本、增强可靠性。函数中发现了一个 bug。
#SQLite 数据库笔记一:(概念 / 终端指令 / SQL 语句 / C 编程 / 回调函数)
数据库 = 数据的仓库,假设数据是海量。能力说明存储数据持久化保存,程序退出数据还在统计数据、分组、排序数据管理增、删、改、查(CRUD)嵌入式设备上也会用数据库(单片机网关、路由器、工业 HMI 都常见),因为 sqlite 体积小、无需服务进程、单文件即可。数据库 = 库 > 表 > 记录(行) > 字段(列)sqlite3 = 开源、C 写的、单文件、免安装、最多 2T 的嵌入式关系型数据库。
2026最新PostgreSQL到Doris数据同步完整教程:全流程图形化配置无需写ETL
本文演示通过NineData控制台将PostgreSQL数据实时同步至Apache Doris的完整流程,涵盖结构、全量、增量三阶段复制。全程图形化操作,无需编写脚本,支持键列与分布键可视化映射、复制规格预检查、数据对比校验及延迟告警。适用于构建稳定高效的实时分析数仓,助力报表与大屏查询基于最新数据。
1-10 PostgreSQL中多表连接全解:inner/left/right/full/cross join
本文基于 PostgreSQL 15+ 完整拆解 5 种主流连接:内连接、左连接、右连接、全连接、笛卡尔连接。结合可落地的测试数据,演示每种连接的执行逻辑、返回结果,重点剖析 NULL 值对 JOIN 匹配的核心影响,彻底解决多表连接数据丢失、匹配异常、结果错乱的问题。
DeepSeek总结的 PostgreSQL 18.7、17.12、16.16、15.20、14.25 及 19 RC 2 发布说明
发布于 2026-11-12,由 PostgreSQL 全球开发组发布PostgreSQL 项目 安全PostgreSQL 全球开发组已发布所有受支持版本的更新,包括 18.7、17.12、16.16、15.20 和 14.25,以及 PostgreSQL 19 的第二个发布候选版本。本次发布修复了 52 个安全漏洞和过去几个月报告的 140 多个 bug。有若干问题可能需要你在更新后采取额外步骤,下文有详细说明。请参阅"更新"一节,了解更新后可能需要执行的步骤。完整变更列表请查阅发布说明。
网站的SQL 注入:从攻击原理到防御措施
SQL 注入(SQL Injection)是 Web 应用中最古老、危害最大的安全漏洞之一。简单来说就是攻击者通过在用户输入中注入了恶意的SQL 代码,让数据库执行非正常的操作,从而能窃取数据、篡改内容甚至控制整个服务器。SQL 注入虽然古老,但至今仍是 Web 安全的头号威胁。永远不要把用户输入直接拼进 SQL 语句。首选:使用 PDO/MySQLi 预处理语句 + 关闭模拟预处理配合:输入类型校验与格式验证加固:数据库最小权限 + 关闭错误回显外围:WAF + 定期安全扫描。
01_SQLServer 体系架构全解 —— 实例进程、关系引擎、SQLOS 与事务日志深入
01_SQLServer 体系架构全解 —— 实例进程、关系引擎、SQLOS 与事务日志深入 系列定位 :《SQL Server 数据库全栈运维实战系列》第 01 篇,与《MySQL 数据库全栈运维实战系列》同构对标(对标 MySQL 01 对应篇目)。 适用版本 :SQL Server 2019/…
SQL Server 增删改查与约束全解:INSERT/UPDATE/DELETE、LIKE 模糊查询、主外键约束
看着简单,但delete和truncate的区别、where漏写、null判断、like通配符、约束命名,每一处都能让新手卡半天。文末给出 WinForm 连接 SQL Server 的完整写法。
快捷键与热键有何异同?
本文对比了热键与快捷键在“粘贴”操作中的异同:用户层面,热键需按Alt+字母组合,快捷键则直接Ctrl+V;开发者层面,修改热键仅需调整菜单标题,而修改快捷键需编辑资源文件中的加速器设置。文章强调专业分工的重要性,并推荐相关排样优化与工具箱技术博文。
多数据库开发和管理工具 SQLark,支持达梦/Oceanbase/TiDB/Oracle/MySQL/PG 数据库!
工具选型这个事,没有绝对的优劣,适合自己的工作流最重要。如果你也在用 OceanBase,可以试试 SQLark,至少在连接配置这个环节,确实要省心不少。
PG18 索引与查询特性在 IvorySQL5.6 上的实测
这一篇测 IvorySQL 5.6(PG18) 在索引与查询侧的三组新能力:nbtree 的 skip scan、GIN 索引的并行构建、以及控制文件复制方式的。
SQLServer 索引与 SQL 优化 —— 聚集索引、非聚集索引、覆盖索引、碎片维护与执行计划
11_SQLServer 索引与 SQL 优化 —— 聚集索引、非聚集索引、覆盖索引、碎片维护与执行计划 系列定位 :《SQL Server 数据库全栈运维实战系列》第 11 篇,与《MySQL 数据库全栈运维实战系列》同构对标(对标 MySQL 11 对应篇目)。 适用版本 :SQL Server…
2万+



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



