SCJD真题,与大家共享。欢迎提出思路,疯狂散分!!!

foryouever 2005-11-14 09:48:11
要求:
1、A client program with a graphical user interface that connects to the database
2、A data access system that provides record locking and a flexible search mechanism
3、Network server functionality for the database system

结构:
1、The main architecture of the application must be a traditional client-server system. There are three key parts: the server-side data management system, the client-side GUI, and the network connection between the two.

2、The program must be able to work in a non-networked mode. In this mode, the database and GUI must run in the same VM and must perform no networking, must not use loopback networking, and must not involve the serialization of any objects when communicating between the GUI and database elements.
The operating mode is selected using the single command line argument that is permitted. Architecturally, this mode must use the database and GUI from the networked form, but must not use the network server code at all.

...全文
580 39 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
39 条回复
切换为时间正序
请发表友善的回复…
发表回复
TONYBLARED 2006-03-15
  • 打赏
  • 举报
回复
最近发现csdn难题开始多了,先前不有一个9*9矩阵,里面有一些数字,求其他位置的数字,然后每行每列都不重复的算法吗?我顶一个。
dreamlins 2006-03-15
  • 打赏
  • 举报
回复
接分
zx2002027 2006-03-15
  • 打赏
  • 举报
回复
昏迷
霖湘凝 2006-03-15
  • 打赏
  • 举报
回复
up
iceandfire 2005-11-20
  • 打赏
  • 举报
回复
看下EJB的实现方式,分local与remote之分,也许对你有些启发
foryouever 2005-11-20
  • 打赏
  • 举报
回复
up
nwpulipeng 2005-11-15
  • 打赏
  • 举报
回复
gz
yanxiazhiqiu 2005-11-15
  • 打赏
  • 举报
回复
mark
zeq258 2005-11-15
  • 打赏
  • 举报
回复
学习!
axuion 2005-11-15
  • 打赏
  • 举报
回复
up!!
batistuta8848 2005-11-15
  • 打赏
  • 举报
回复
学习ing...
OnlyFor_love 2005-11-15
  • 打赏
  • 举报
回复
学习一下 呵呵
jFresH_MaN 2005-11-15
  • 打赏
  • 举报
回复
不太明白“非网络模式”的意思。
guomengran_1979 2005-11-15
  • 打赏
  • 举报
回复
支持
接分
loulou82 2005-11-15
  • 打赏
  • 举报
回复
还是别翻译了,直接看吧~
keke1 2005-11-15
  • 打赏
  • 举报
回复
全英文阿!
也来支持一下
hui_feng 2005-11-15
  • 打赏
  • 举报
回复
UP
foryouever 2005-11-15
  • 打赏
  • 举报
回复
Overall Architecture
Major Components
The main architecture of the application must be a traditional client-server system. There are three key parts: the server-side data management system, the client-side GUI, and the network connection between the two.
Non-Networked Mode
The program must be able to work in a non-networked mode. In this mode, the database and GUI must run in the same VM and must perform no networking, must not use loopback networking, and must not involve the serialization of any objects when communicating between the GUI and database elements.
The operating mode is selected using the single command line argument that is permitted. Architecturally, this mode must use the database and GUI from the networked form, but must not use the network server code at all.

Network Communication Approach
You have a choice regarding the network connection protocol. You must use either serialized objects over a simple socket connection, or RMI. Both options are equally acceptable. Keep in mind that networking must be entirely bypassed in the non-networked mode.
Restrictions on RMI
To avoid unnecessary complexity in the marking environment certain restrictions are placed on solutions that use RMI. Specifically:

You must not require the use of an HTTP server.
You must not require the installation of a security manager.
You must provide all classes pre-installed so that no dynamic class downloading occurs.
You must use RMI over JRMP (do not use IIOP)
Return to top


--------------------------------------------------------------------------------

The User Interface
The user interface for this assignment must satisfy the following criteria:
It must be composed exclusively with components from the Java Foundation Classes (Swing components).
It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user.
It must present search results in a JTable.
It must allow the user to book a selected record, updating the database file accordingly.
Your user interface should be designed with the expectation of future functionality enhancements, and it should establish a framework that will support this with minimal disruption to the users when this occurs.
Return to top


--------------------------------------------------------------------------------

Server
Required Interface
Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must implement the following interface:

package suncertify.db;
public interface DBMain {
// Reads a record from the file. Returns an array where each
// element is a record value.
public String [] read(int recNo) throws RecordNotFoundException;
// Modifies the fields of a record. The new value for field n
// appears in data[n].
public void update(int recNo, String [] data)
throws RecordNotFoundException;
// Deletes a record, making the record number and associated disk
// storage available for reuse.
public void delete(int recNo) throws RecordNotFoundException;
// Returns an array of record numbers that match the specified
// criteria. Field n in the database file is described by
// criteria[n]. A null value in criteria[n] matches any field
// value. A non-null value in criteria[n] matches any field
// value that begins with criteria[n]. (For example, "Fred"
// matches "Fred" or "Freddy".)
public int [] find(String [] criteria)
throws RecordNotFoundException;
// Creates a new record in the database (possibly reusing a
// deleted entry). Inserts the given data, and returns the record
// number of the new record.
public int create(String [] data) throws DuplicateKeyException;
// Locks a record so that it can only be updated or deleted by this client.
// If the specified record is already locked, the current thread gives up
// the CPU and consumes no CPU cycles until the record is unlocked.
public void lock(int recNo) throws RecordNotFoundException;
// Releases the lock on a record.
public void unlock(int recNo) throws RecordNotFoundException;
// Determines if a record is currenly locked. Returns true if the
// record is locked, false otherwise.
public boolean isLocked(int recNo)
throws RecordNotFoundException;
}

Any unimplemented exceptions in this interface must all be created as member classes of the suncertify.db package. Each must have a zero argument constructor and a second constructor that takes a String that serves as the exception's description.

Any methods that throw RecordNotFoundException should do so if a specified record does not exist or is marked as deleted in the database file.

Network Approaches
Your choice of RMI or serialized objects will not affect your grade, but no other approach is acceptable. In either case, the program must allow the user to specify the location of the database, and it must also accept an indication that a local database is to be used, in which case, the networking must be bypassed entirely. No authentication is required for database access.
Locking
Your server must be capable of handling multiple concurrent requests, and as part of this capability, must provide locking functionality as specified in the interface provided above. You may assume that at any moment, at most one program is accessing the database file; therefore your locking system only needs to be concerned with multiple concurrent clients of your server. Any attempt to lock a resource that is already locked should cause the current thread to give up the CPU, consuming no CPU cycles until the desired resource becomes available.
foryouever 2005-11-15
  • 打赏
  • 举报
回复
为了便于理解,我把题目全部贴出,和大家一起学习。希望各位多捧场!谢谢。
Application Overview
Background
Bodgitt and Scarper, LLC. is a broker of home improvement contractors. They take requests from home owners for a type of service, and offer the homeowner one or more contractors that can provide the required services. Curently, Bodgitt and Scarper provides this service over the phone using a team of customer service representatives (CSRs). The CSRs interact with an ageing custom-written application that has been drawing increasing criticism from the CSRs. In the future, Bodgitt and Scarper wants to move into Internet-based marketing, and hopes to be able to provide their services directly to customers over the web.
The company's IT director has decided to migrate the existing application to a Java technology based system. Initially, the system will support only the CSRs, although the hope is that this interim step will give them a starting point for migrating the system to the web. The IT director does not anticipate much reuse of the first Java technology system, but intends to use that system as a learning exercise before going on to a web based system.

The company's IT department has a data file that contains the essential information for the company, but because the data must continue to be manipulated for reports using another custom-written application, the new system must reimplement the database code from scratch without altering the data file format.

The new application, using the existing data file format, must allow the CSRs to generate a list of constractors that match a customer's criteria. This is the project that you have been commissioned to implement.

What you must do
The following are the "top level" features that must be implemented:
A client program with a graphical user interface that connects to the database
A data access system that provides record locking and a flexible search mechanism
Network server functionality for the database system
The work involves a number of design choices that have to be made. In all such cases, the following principles should be applied.
Clarity and Maintainability
A clear design, such as will be readily understood by junior programmers, will be preferred to a complex one, even if the complex one is a little more efficient. Code complexity, including nesting depth, argument passing, and the number of classes and interfaces, should be reasonable.
Documentation
The code itself should be as clear as possible; do not provide comments that do not add to the comprehensibility of the code. Awkward or complex code should have descriptive comments, and javadoc style comments must be used for each element of the public interface of each class. You must create a full suite of documentation for the classes of the completed project. This must be generated using the tool "javadoc" and must be in HTML format. Provide javadoc documentation for all classes you write.
You must provide basic user documentation. This should be sufficient to allow a user who is familiar with the broad purpose of the project to use the application. This documentation must be in one of these three formats:
HTML
Plain text (not a wordprocessor format)
Within the application as a help system.
Correctness
Your project must conform to this specification. Features that deviate from specification will not receive full credit. You will not receive extra credit points for work beyond the requirements of the specification.
Use of Standard Elements
Use of functionality provided by the core Java classes will be preferred to your own implementation of that functionality, unless there is a specific advantage to providing your own implementation.
foryouever 2005-11-15
  • 打赏
  • 举报
回复
我是楼主
综合各位回复,总结如下:
大家比较关注的两个问题:1、所谓的non-networked mode。2、所谓的must not use the network server code at all
就1而言,关键问题是c和s是两个进程,两个进程间不过不使用127地址回环的话,如何进行通信,这是个要解决的问题
2、不明确所说的network server code究竟指的是什么东东
加载更多回复(19)

62,635

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧