单词操作 [英] Word manipulation

查看:91
本文介绍了单词操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须编写一个java程序来接受句子,然后输出有效单词的数量,最长的单词,发生的次数,最短的单词和发生的次数。我想要做的是创建处理每个方法的方法,然后主要请求句子并输出结果。任何人都可以帮忙吗?

解决方案

到目前为止你有什么?你已经给了我们你的想法......现在,你认为你将如何完成第一个功能?第二个?


向我们展示你的尝试,我们将帮助指导你找到答案。


< blockquote class =post_quotes>
我必须编写一个java程序来接受句子,然后输出有效单词的数量,最长的单词,发生的次数,最短的单词以及发生的次数..我想要做的是创建处理每个方法的方法,然后主要请求句子并输出结果。有人可以帮忙吗?



您如何确定哪个单词有效,哪个单词无效?你到目前为止编写了什么代码?



到目前为止你有什么?你已经给了我们你的想法......现在,你认为你将如何完成第一个功能?第二个?


向我们展示你的尝试,我们将帮助指导你找到答案。

展开 | 选择 < span class =codeDivider> | Wrap | 行号


I have to write a java program to take in sentence and then output the number of valid words, the longest word, how many times it occurred, the shortest word and how many times that occurred.. What I want to do is create methods for processing each of those and then have the main to ask for the sentence and output the results. Can anyone help?

解决方案

What do you have so far? You''ve given us your ideas...now, how do you think you''ll accomplish the first function? The second?

Show us what you''ve tried, and we''ll help guide you to the answer that way.


I have to write a java program to take in sentence and then output the number of valid words, the longest word, how many times it occurred, the shortest word and how many times that occurred.. What I want to do is create methods for processing each of those and then have the main to ask for the sentence and output the results. Can anyone help?

How are you going to determine which word is valid and which one is not? What code have you written so far?


What do you have so far? You''ve given us your ideas...now, how do you think you''ll accomplish the first function? The second?

Show us what you''ve tried, and we''ll help guide you to the answer that way.

Expand|Select|Wrap|Line Numbers


这篇关于单词操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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