我必须制作这个java项目,我已经尝试了好几次但收到很多很多错误..请帮助 [英] I have to make this java project, I've tried several times but getting lots lots and lots of errors.. Please help

查看:78
本文介绍了我必须制作这个java项目,我已经尝试了好几次但收到很多很多错误..请帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

酒店预订系统



•提示用户当前的要求(房间偏好和预订日期)。

•符合用户的要求目前可用的房间。酒店可能会有几种价格不一的房型 - 顶层套房,带特大号床的大房间,单人房等。

•为用户分配房间

•列表房间状态如单卧室数量4预订2

•按房间类型搜索房间空房

•退出程序时将预订详细信息保存在文件中并在程序时加载文件开始



我尝试了什么:



我试过这样做我自己编码很多次但是很混乱,我得到了很多错误,我必须在5个小时内提交

Hotel Reservation System

• Prompt for user’s current requirements (room preference and dates of booking).
• Match user’s requirements with currently available rooms. A hotel will likely have several variably priced room types – penthouse suites, large rooms with king size beds, single bed rooms, etc.
• Assign a room to user
• List Rooms with status like single bedroom qty 4 booked 2
• Search room availability by room type
• Saves the booking detail in file when quitting program and loads the file when program starts

What I have tried:

I have tried doing the code myself many times but it gets confusing and I'm getting lot of errors, I have to submit in 5 hours

推荐答案

引用:

我必须在5个小时内提交

I have to submit in 5 hours

对于这个规模的项目来说,简单的5个小时是不可能的延迟。



为了捕获错误,专业人员正在使用名为调试器的工具,它通过试图猜出错误来避免追逐错误。


如果您的问题是正确的算法,我建议学习分析方法, Dijkstra自上而下方法是一个良好的开端。

< a href =https://en.wikipedia.org/wiki/Top-down_and_bottom-up_design> https://en.wikipedia.org/wiki/Top-down_and_bottom-up_design [ ^ ]

https://en.wikipedia.org/wiki/Structured_programming [ ^ ]

https ://en.wikipedia.org/wiki/Edsger_W._Dijkstra [ ^ ]

https:// www。 cs.utexas.edu/users/EWD/ewd03xx/EWD316.PDF [< a href =https://www.cs.utexas.edu/users/EWD/ewd03xx/EWD316.PDF\"target =_ blanktitle =New Window> ^ ]



-----

你应该学会尽快使用调试器。而不是猜测你的代码在做什么,现在是时候看到你的代码执行并确保它完成你期望的。



调试器允许你跟踪执行逐行检查变量,你会看到它有一个停止做你期望的点。

调试器 - 维基百科,免费的百科全书 [ ^ ]

http://docs.oracle.com/ javase / 7 / docs / technotes / tools / windows / jdb.html [ ^ ]

https://www.jetbrains.com/idea/help/debugging-your-first-java-application.html [ ^ ]



调试器在这里向您展示您的代码正在做什么,您的任务是与它应该做什么进行比较。

调试器中没有魔法,它没有找到错误,它只是帮助你。当代码没有达到预期的效果时,你就会接近一个错误。

Simply 5 hours is about an impossible delay for this size of project.

In order to catch bugs, professionals are using a tool named debugger, it avoid chasing bugs by trying to guess what is wrong.

If your problem is getting the algorithm right, I recommend to learn an analyze method, Dijkstra Top-Down method is a good start.
https://en.wikipedia.org/wiki/Top-down_and_bottom-up_design[^]
https://en.wikipedia.org/wiki/Structured_programming[^]
https://en.wikipedia.org/wiki/Edsger_W._Dijkstra[^]
https://www.cs.utexas.edu/users/EWD/ewd03xx/EWD316.PDF[^]

-----
You should learn to use the debugger as soon as possible. Rather than guessing what your code is doing, It is time to see your code executing and ensuring that it does what you expect.

The debugger allow you to follow the execution line by line, inspect variables and you will see that there is a point where it stop doing what you expect.
Debugger - Wikipedia, the free encyclopedia[^]
http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jdb.html[^]
https://www.jetbrains.com/idea/help/debugging-your-first-java-application.html[^]

The debugger is here to show you what your code is doing and your task is to compare with what it should do.
There is no magic in the debugger, it don't find bugs, it just help you to. When the code don't do what is expected, you are close to a bug.


这篇关于我必须制作这个java项目,我已经尝试了好几次但收到很多很多错误..请帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆