├── .idea ├── .gitignore ├── kotlinc.xml ├── vcs.xml ├── modules.xml ├── misc.xml └── libraries │ └── KotlinJavaRuntime.xml ├── out └── production │ └── untitled │ ├── Player.class │ ├── demo.class │ ├── Playground.class │ ├── Registration.class │ └── PlaygroundOwner.class ├── untitled.iml ├── LICENSE.md ├── src ├── Player.java ├── PlaygroundOwner.java ├── Playground.java ├── Registration.java └── demo.java └── README.md /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /out/production/untitled/Player.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhaledAshrafH/GoFo-System/HEAD/out/production/untitled/Player.class -------------------------------------------------------------------------------- /out/production/untitled/demo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhaledAshrafH/GoFo-System/HEAD/out/production/untitled/demo.class -------------------------------------------------------------------------------- /out/production/untitled/Playground.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhaledAshrafH/GoFo-System/HEAD/out/production/untitled/Playground.class -------------------------------------------------------------------------------- /out/production/untitled/Registration.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhaledAshrafH/GoFo-System/HEAD/out/production/untitled/Registration.class -------------------------------------------------------------------------------- /out/production/untitled/PlaygroundOwner.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhaledAshrafH/GoFo-System/HEAD/out/production/untitled/PlaygroundOwner.class -------------------------------------------------------------------------------- /.idea/kotlinc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /untitled.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/KotlinJavaRuntime.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Khaled Ashraf Hanafy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/Player.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | /** 3 | * @since 12/6/2021 4 | * @version 1.0 5 | * @author Shimaa Reda Saeed 6 | * @author Khaled Ashraf Hanafy 7 | * @author Ahmed Sayed Hassan 8 | * */ 9 | public class Player { 10 | /** 11 | * String namePlayground 12 | * */ 13 | protected String namePlayground; 14 | 15 | Scanner input = new Scanner(System.in); 16 | int start , end , index = -1; 17 | /** 18 | * @param playground 19 | * Booking playground 20 | * */ 21 | public void Book( Playground playground) 22 | { 23 | if(playground.playgrounds.isEmpty())//if ArrayList to store playgrounds is Empty 24 | { 25 | System.out.println("Not Available Playgrounds"); 26 | } 27 | else 28 | { 29 | playground.displayPlaygrounds();//Display information playgrounds in System 30 | System.out.print("Choose NamePlayground : "); 31 | namePlayground = input.next(); 32 | index = playground.SearchName(namePlayground);//Return index of position playground 33 | if(index != -1)//if Name found 34 | { 35 | System.out.println(playground.playgrounds.get(index));//get Index 36 | //Book Range 37 | System.out.print("Enter Start Time : "); 38 | start = input.nextInt(); 39 | System.out.print("Enter End Time : "); 40 | end = input.nextInt(); 41 | playground.Range(start,end,playground.playgrounds.get(index)); 42 | } 43 | else 44 | { 45 | System.out.println("This playground Not found"); 46 | } 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /src/PlaygroundOwner.java: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.Scanner; 3 | /** 4 | * @since 12/6/2021 5 | * @version 1.0 6 | * @author Shimaa Reda Saeed 7 | * @author Khaled Ashraf Hanafy 8 | * @author Ahmed Sayed Hassan 9 | * */ 10 | public class PlaygroundOwner { 11 | Scanner input=new Scanner(System.in); 12 | 13 | ArrayList playgrounds = new ArrayList<>();//ArrayList to store playgrounds 14 | 15 | /** 16 | *Display Playgrounds In the System 17 | * */ 18 | public void displayPlaygrounds()//Display Playgrounds In the System 19 | { 20 | if(playgrounds.isEmpty())//if ArrayList to store playgrounds is Empty 21 | { 22 | System.out.println("Not Found Playground"); 23 | } 24 | else 25 | { 26 | for (int i=0;i playgrounds = new ArrayList<>();//ArrayList to store playgrounds 19 | 20 | /** 21 | * @param playground 22 | * */ 23 | public void AddPlayground(Playground playground)//Add playground in System 24 | { 25 | playgrounds.add(indexPlayground++,playground); 26 | } 27 | 28 | /** 29 | * Display Playgrounds In the System 30 | * */ 31 | public void displayPlaygrounds()//Display Playgrounds In the System 32 | { 33 | if(playgrounds.isEmpty())//if ArrayList to store playgrounds is Empty 34 | { 35 | System.out.println("Not Found Playground"); 36 | } 37 | else 38 | { 39 | for (int i=0;i Players = new ArrayList<>();//ArrayList to store players Accounts 79 | ArrayList PlaygroundOwners = new ArrayList<>();//ArrayList to store playground owner Accounts 80 | 81 | /** 82 | * @param Kind 83 | * Player or PlaygroundOwner 84 | * */ 85 | public void Register(String Kind) 86 | { 87 | Registration R = new Registration();//new object from Registration 88 | 89 | //enter username information 90 | System.out.println("Enter Your information"); 91 | System.out.print("Enter Your Name : "); 92 | R.userName = input.next(); 93 | System.out.print("Enter Your Password : "); 94 | R.password = input.next(); 95 | System.out.print("Enter Your phone : "); 96 | R.phone = input.next(); 97 | System.out.print("Enter Your Email : "); 98 | R.email = input.next(); 99 | 100 | if(Kind.equals("1"))//Account is player 101 | { 102 | R.userType="Player"; 103 | Players.add(indexOfPlayers++,R);// 104 | } 105 | else if (Kind.equals("2"))//Account is playground owner 106 | { 107 | R.userType="PlaygroundOwner"; 108 | PlaygroundOwners.add(indexOfPlaygroundOwner++,R); 109 | } 110 | else 111 | { 112 | System.out.println("NOt Recognize Type! "); 113 | } 114 | } 115 | boolean check = false;//State of Check User 116 | 117 | /** 118 | * @param Username 119 | * userName of player or playgroundOwner 120 | * @param Password 121 | * password of player or playgroundOwner 122 | * @return check 123 | * */ 124 | public boolean CheckUser(String Username,String Password) 125 | { 126 | if(str.equals("Player"))//Option 1 is player 127 | { 128 | if(Players.isEmpty())//if ArrayList to store players Accounts is Empty 129 | { 130 | check = false; 131 | } 132 | else 133 | { 134 | for(int i=0;i