creating a controller to allow instances to be created from keyboard
Hi,
I was wanting some help creating a controller for 2 classes which I have already created, Academic and Employee. I have not created a controller before and so I am a little unsure as to where to begin with this. I have had a look online at some tutorials but all seems a little more complex than what I feel my sepcification requires.
This is my first Java assignment, for the higher marks we have not been given much detail, but simply asked to create a controller which allows instances of Employee and Academic to be created from the keyboard.
Could someone please help me with this. It would be greatly appreciated.
Many thanks
Re: creating a controller to allow instances to be created from keyboard
I'm not really sure I know what that actually means to be honest, is the controller just a new class which creates Employees and Academics?
// Json
Re: creating a controller to allow instances to be created from keyboard
yes, by allowing keyboard input...
Re: creating a controller to allow instances to be created from keyboard
Code :
import java.util.Scanner;
...
Scanner sIn = new Scanner(System.in);
String name = sIn.nextLine();
You get the idea??
Re: creating a controller to allow instances to be created from keyboard
i dont really understand how to progress with that...
would it help if i showed you one of my classes so you can start me off with an example?