java 编程的小问题

来源:百度知道 编辑:UC知道 时间:2024/06/15 09:43:56
哪位高手帮我看看这3个小程序怎么编啊?谢谢啦
Problem 2
Write your program in the file Titles.java.

Ask the user for the names of three books (three strings). Alphabetize these titles, ignoring the word "the" if it appears at the beginning of a title. Print the full names of the books (three strings, including an inital "the" if present) in alphabetical order.

Construct a set of test cases for your program, and enter these in assign4-testcases.txt.

Example:

java Titles

Hamlet
The Great Gatsby
Great Expectations

RESULT: "Great Expectations"
RESULT: "The Great Gatsby"
RESULT: "Hamlet"

Problem 3
Write your program in the file ReverseWords.java.

Ask the user for a sentence. Output a sentence containing the same words, but in reverse order. You may assume that the input sentence contains no punctuation except possibly a period at the end. The

分成三个问题问 然后翻译一下比较好。。

这题都问?
真无奈。
不就是文件读写和字符串分析吗?
15分钟就全搞了。
30分。
算了。。
鄙视楼上,学程序这都看不懂,还学个毛。

仔细想想 你可以的

你还鄙视别那,我就鄙视你这种"傲人",你看看你自己怎么说话的.