wm: java

ref: 96c2f72ed84c8afc0d21b01232cd62219e3789aa
dir: /Main.java/

View raw version
import java.util.*;
import java.time.*;

public class Main
{
	public static void main(String args[])
	{
		Scanner s = new Scanner(System.in);
		User m = new RegUser(s.nextLine());
		System.out.println(m.ID);
	}
}
class Book
{
	private String agegroup, abstract, author, name, ISBN;
	void Register()
	{
	}
}
abstract class User
{
	String username;
	int ID, reserved; //?
	LocalTime regTime;
	abstract bool IsReserved()


}
class RegUser extends User
{
	int age;
	RegUser(String uname)
	{
		this.username = uname;
		this.ID = (int)(Math.random() * 1000);
		this.regTime = LocalTime.now();
	}

	bool IsReserved(int ISBN)
	{
		if(ISBN = ID)
			return true;
		else
			return false;
	}
}

class Admin extends User
{
	private Sting password;
	private bool active
	Admin(String password)
	{
			
	}
	void setActive(bool a, String pass)
	{
		if(pass == this.password)
			this.active = a;
		else
			System.out.println("auth failure");
	}
}