JAVA MICRO Project Sem 4, IT, GTU
JAVA MICRO Project Sem 4, IT, GTU
.
❑ Encapsulation: Encapsulation is the technique of making
the fields in a class private and providing access via public
methods. This is used to protect the data within an object
from unintended modification. While the project could
further encapsulate fields by making them private and
providing getter and setter methods, it already encapsulates
the functionality within class methods.
160. case 4:
161. collegeManagement.displayPassPercentage();
162. break;
163. case 5:
164. collegeManagement.displayTopThreeStudents();
165. break;.
166. case 6:
167. System.out.print("Enter file name to save: ");
168. String saveFileName = scanner.nextLine();
169. collegeManagement.saveToFile(saveFileName);
170. break;
171. case 7:
172. System.out.print("Enter file name to load: ");
173. String loadFileName = scanner.nextLine();
174. collegeManagement.loadFromFile(loadFileName);
175. break;
176. case 8:
177. System.out.println("Exiting...");
178. System.exit(0);
179. break;
180. default:
181. System.out.println("Invalid choice!");
182. }
183. }
184. }
185. }
-: Output :-
.
.