public void Padd(String cid){
		//get all input;
		Scanner scan = new Scanner(System.in);
		Scanner scan0 = new Scanner(System.in);

		while(true)
		{
			if(cid.equals("CSC440"))
				System.out.println("What is this homework based on?\n  1.Database Fundamentals\n  2.ER Design\n  3.Security and Authorization");
			else
				System.out.println("What is this homework based on?\n  1.Binary search trees and Btrees\n  2.Hashing\n  3.Files and indexing and other topics");

			System.out.println("Which section do you want to add question to?");
	        System.out.println(" 0. Back");

			int basedon;
			while(true){
				basedon= scan0.nextInt();
	           	if(checkint(basedon,0,3))
	        		break;			        	
	        }
	        
	        if (basedon == 0)
	        {
	        	break;// go back
	        }
	        else 
	        {
	        	System.out.println("Enter the question:");
	        	String qtxt = scan.nextLine();
	        	
					
				System.out.println("What is the difficulty of this question? (1 to 5)");
				int difficulty;
				while(true){
					difficulty= scan0.nextInt();
		           	if(checkint(difficulty,1,5))
		        		break;		
		           	else
		           	{
		           		System.out.println("Invalid input! Please enter again:");
		           	}
		        }
		        /*
				System.out.println(qtxt);
		        System.out.println(selsection);
		        System.out.println(correctAns[0]);
		        System.out.println(incorrectAns[0]);
		        System.out.println(hint[0]);
*/

				int success = -1;
				
				//add input to QUESTION table
				try{
					Connection conn = DBConnection.ConnectDB();
					String insertQuery = "INSERT INTO Question VALUES (question_id.nextval,'"+cid+"','"+qtxt +"', "+basedon+","+difficulty+")";
					Statement stmt = conn.createStatement();
					success = stmt.executeUpdate(insertQuery);

				}
				catch(Exception e){
					System.out.print('\u000C');
					System.out.println("Problem adding question: "+ e.getMessage());
				}
				
				

				//if added successfully, print line and return true
				if(success == 1){
					System.out.print('\u000C');
					System.out.println("Question added successfully.");
					/*try{
						String insertQuery = "UPDATE Excercise SET numofquestion = numofquestion + 1 WHERE ";
						Statement stmt = conn.createStatement();
						success = stmt.executeUpdate(insertQuery);
					}
					catch(Exception e)
					{
						
					}*/
				}
				//if not added successfully, return false
				else{
					System.out.print('\u000C');
					System.out.println("Sorry, we could not add this question, please try again.");
				}
				
			}
			
				
	    	}
	}