您的位置:寻梦网首页编程乐园Java天地Core JavaJava Lecture Notes

Introduction

Content

Apply

Reflect

Extend

previous.gif
 (3087 bytes)

next.gif
 (2959 bytes)


Extend Index

Extend Page # 10

Topic 2 — Level of monitoring of user input

A Java program should check that the data entered by the user is basically sound. For example, if asked to enter a person’s age, it is probably incorrect to enter ‘Fred Bloggs’. This is probably a mistake on the part of the user. On the other hand, if the user enters ‘200’ for a person’s age this is probably a mistake as well, but it is much harder for the programmer to detect. To what extent should the programmer anticipate these kinds of user error?

What are the consequences of the following?

(a) very strict monitoring of the user’s input

(b) very little monitoring of the user’s input

Back to top

 basicline.gif (169 bytes)

RITSEC - Global Campus
Copyright ?1999 RITSEC- Middlesex University. All rights reserved.
webmaster@globalcampus.com.eg