This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Problem~~ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Problem~~" Watch "Problem~~" New topic


Mitchell Kave
Ranch Hand

Joined: May 12, 2002
Posts: 70
CAn any good programmer help me on this topic? i try half way.. but can't do it. pls.. help me.. important!!! ok!!! thanks!!
1) Keypad for Entry System
Write a program that will output a keypad which
consists of numeric buttons for entering pin numbers
for an entry system and a display panel. (You do not
have to program entire entry system, just the keypad
Your keypad should also be visible on another computer
that is connected in a simple network. When pin
numbers are entered, the keypad on this computer will
display the numbers that were entered. The operator
from this computer will then check whether the numbers
are valid and send an appropriate code. Based on the
code, the first computer will display certain message
and play certain sound. The codes are as below:
1 � Valid. Display �VALID-YOU MAY ENTER� on the
display panel and play a sound.
2 � Not valid. Display �INVALID CODE � PLEASE REENTER
NUMBERS� and play another sound.
A sample keypad should look like the one below. You
do not have to follow exactly like the one below. Be

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24183

Well, this is a pretty crazy homework assignment.
The "output a keypad" part is ambiguous; do they mean "show a keypad GUI window" or do they mean "print a picture of a keypad to standard output"?
The "network" part implies communication between multiple programs, not just one program; but the instructions don't make this clear at all.
I imagine the right approach to take depends a lot on what you've been learning in this course. You could do this with servlets and HTML, if this was a web-based programming course; or you could do it with Swing and RMI, if these things were taught; or you could use raw sockets and System.out.println(). It all depends on the instructor's expectations. I wouldn't hesitate to go to the TA or instructor and ask for some serious clarification.

[Jess in Action][AskingGoodQuestions]
Mitchell Kave
Ranch Hand

Joined: May 12, 2002
Posts: 70
ACtually it wants something like this.
Two pc program connected in the network. But when the first pc program
type the keywords. The second pc will come out with the "name" or something like "biodata"
if it's valid.. it will play certain sounds.
and if it's not.. it will play certain sounds also.
i have the first program with me now. do u want to see it?
ACtually.. i haven't learned that far in java....
what u asked me in this forum regarding about the swing.i know nothings.
pls do help me with this problem first.
i have pasted the code as well, THanks!!!

(edited by Cindy to format code using [ code] and [ /code] tags without the spaces)
[ September 03, 2003: Message edited by: Cindy Glass ]
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24183

First of all, you're going to drive yourself crazy writing code this way! Put all those buttons into an array; then code like

Can be reduced to:

If you did this everywhere, you'd cut the size of this code in half, and save yourself a lot of aggravation!
Now, if you want to make this communicate with another, similar program on another computer, you have at least two choices: you can use raw sockets, or you can use RMI. If you don't know anything about either, I'd recommend you use RMI, and start by reading Sun's tutorial on the topic.
Mitchell Kave
Ranch Hand

Joined: May 12, 2002
Posts: 70
Hi,Mr Ernest
Would u mind to help me out with this program?
i just need a good programmer to finish this up.
frankly,i'm just a beginner in java.....
this is the program that have to be done, even the lecturer didn't cover up much of the topic. that's sucks.......
it's my fren program... i was shocked when i see it?
pls.. help........ Mr Ernest
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24183

Hi Mitchell -
I understand you're in a bind to get this assignment done. However, as a teacher and writer myself, I'm only interested in helping you learn something. The work you'll have to do yourself.
Please understand that I am confining my comments to helping you do your work. Getting the assignment done is yours and yours alone to worry about.
Start by reading the RMI tutorial!
Mitchell Kave
Ranch Hand

Joined: May 12, 2002
Posts: 70
Hi,Mr Ernest.
I understand what u meant?But now i'm really need your help only.
just for this time.I do really understand that i have to do it by myself but this isn't my assigment. I will promise that i will learn java in here always. plsss.....
i will read the RMI tutorial next time. plsss........
I agree. Here's the link:
subject: Problem~~
Similar Threads
Need help with Constructors program
Conversion help plz!!!
Change Due/Tendered Program
[HOMEWORK] Please need help with java project
Java Programming