创建一个简单的java命令行界面应用程序? [英] Creating a simple java command line interface application ?

查看:83
本文介绍了创建一个简单的java命令行界面应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说明



创建一个简单的CLI(命令行界面)应用程序。



当我们测试时你的应用程序,它必须做三件事:欢迎用户。提示用户输入。对不同的输入做出不同的反应。处理错误的输入并提供退出选项。



例如(请不要制作这个确切的程序):程序打印出欢迎信息。该程序打印出一条消息,询问用户的感受。如果用户输入好,则程序以愉快的消息响应。如果用户输入bad,程序将回复一条消息以使用户感觉更好。如果用户输入任何其他内容,该程序会回答:抱歉,我不明白。如果用户在任何时候进入退出,程序退出



我尝试过:



创建一个简单的CLI(命令行界面)应用程序。



我不能这样做。 D:

Instructions

create a simple CLI (command line interface) application.

When we test your application, it must do three things: Welcome the user. Prompt the user for input. Respond differently to different input. Handle bad input and provide an exit option.

For example (and please do not make this exact program): The program prints out a welcome message. The program prints out a message asking how the user is feeling. If the user enters "good", the program responds with a happy message. If the user enters "bad", the program responds with a message to make the user feel better. If the user enters anything else, the program responds with, "Sorry, I did not understand that." If the user enters "exit" at any point, the program exits

What I have tried:

create a simple CLI (command line interface) application.

I can't do it. D:

推荐答案

[ ^ ]将是一个很好的起点。



和CodeProject,我们不会为你工作。 我们帮助您完成工作。 不幸的是,我们无法帮助您学习Java和Java编程的基础知识。 这是你自己需要做的事情。 如果您遇到特定的问题,我们很乐意尝试帮助。



/ ravi
This[^] would be a good place to start.

And CodeProject, we don't do your work for you.  We help you do your work.  Unfortunately, we can't help you learn Java and the basics of Java programming.  That's something you'll need to do yourself.  If you have a specific problem, we'd be glad to try and help.

/ravi


这篇关于创建一个简单的java命令行界面应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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