回 帖 发 新 帖 刷新版面

主题:国外大学考试题!!!!!!求教 高手请进

以下是国外大学考试题 超难 哪位高手能帮帮小弟 试着编一下


Use Java to create a class called bookList that is able to store simple
information regarding a collection of books at the nodes of a bi-directional linked
list. Each node in the list should be able to store:
- the book title (String)
- the author name (String)
- the recommended retail price (double)
- the year of publication (int)
Both the list and node classes should possess an appropriate constructor to
initialise the list and the information stored at each node of the list respectively.
The bookList (list) class should possess an add method that adds new nodes to
a specified position within the list (if such a position exists).
Your answer should include a full design and properly commented Java code.
[Total 33 Marks]

3a. Describe and compare static data structures, e.g. arrays, and dynamic data
structures, e.g. linked lists. Your answer should include illustrative examples of
Java code and/or appropriate pseudo-code.
[13 marks]

3b. The class twoInts, is shown below:
public class twoInts
{
private int A, B;
public twoInts(int newA, int newB)
{
A = newA;
B = newB;
}
public int intSum()
{
return(A + B);
}
}
Implement the BubbleSort (otherwise known as ExchangeSort) algorithm
to sort an ArrayList of twoInts objects in ascending order of their summed
member variables, i.e. in ascending order of (A+B) for each twoInts object.
[20 marks]
[Total 33 Marks]

4. Write an essay on the implementation of search and sort algorithms in Java. Your
answer should detail both the manner in which popular search and sort algorithms
are implemented in Java and the benefits provided by their employment over
linear search and sort procedures. Your answer must include detailed illustrative
examples written in Java and should also cover the concept of recursion and its
use in algorithms such as Binary search and QuickSort.
[Total 33 Marks]

5a. Briefly describe each of the following features of Java and explain how they are
used, including illustrative examples of Java code: the System.err stream, the
StringTokenizer class, serialization, exception propagation and the
throws clause.
[25 marks]

5b. Describe conversion of the standard System.in I/O stream to receive and
capture buffered keyboard input. Your answer should include an illustrative
example of Java code and/or appropriate pseudo-code.

回复列表 (共2个回复)

沙发

叫人帮你是害你

真正到国外你能看懂吗?就不用说读给人家听了


板凳

这种东西自己看看就能懂的
第一题用collection中的LinkedList做,这东西相当与C中的循环链表,其他的应该很容易做的

我来回复

您尚未登录,请登录后再回复。点此登录或注册