wm: java

Download patch

ref: 96c2f72ed84c8afc0d21b01232cd62219e3789aa
author: mkf <mkf>
date: Mon May 8 23:40:21 EDT 2023

import sources

--- /dev/null
+++ b/Main.java
@@ -1,0 +1,63 @@
+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");
+	}
+}