public static void editCourseWork(Course tempCourse){
		if(tempCourse.getCourseWork()==null){//add percentage of coursework
			System.out.print("Please Input Total Weighted Percentage of the Coursework : ");
			int weightage;
			while(true){//only int input accepted
				if(sc.hasNextInt()){
					weightage = sc.nextInt();
					break;
				}else {
					System.out.println("Please enter a valid choice!");
					sc.next();
				}
			}
			CourseWork tempCourseWork = new CourseWork(tempCourse.getId(), tempCourse.getName(), weightage, tempCourse);
			tempCourse.setCourseWork(tempCourseWork);
			System.out.println("Weighted Percentage is " + Integer.toString(tempCourse.getCourseWork().getWeightage()));
			editCourseWorkComponent(tempCourse);
		}else{//edit existing percentage
			System.out.println("Current Weighted Percentage is" + Integer.toString(tempCourse.getCourseWork().getWeightage()));
			System.out.print("Enter 1 to Update Coursework Total Weightage or 2 to Update Coursework Components : ");
			int choice;// = sc.nextInt();
			while(true){//only int input accepted
				if(sc.hasNextInt()){
					choice = sc.nextInt();
					break;
				}else {
					System.out.println("Please enter a valid choice!");
					sc.next();
				}
			}
			if(choice == 1){
				int weightage;
				while(true){//only int input accepted
					if(sc.hasNextInt()){
						weightage = sc.nextInt();
						break;
					}else {
						System.out.println("Please enter a valid choice!");
						sc.next();
					}
				}
				System.out.print("Please Input Total Weighted Percentage of Coursework : ");
				tempCourse.getCourseWork().setWeightage(weightage);
				System.out.println("Weighted Percentage is " + Integer.toString(tempCourse.getCourseWork().getWeightage()));
			}else if(choice == 2){
				editCourseWorkComponent(tempCourse);
			}
		}
		db.store(tempCourse);
	}