Question: the below code must delete the resources added to the arraylist CMlist using the deletehumanresources() method. also load the resources from the file and add

the below code must delete the resources added to the arraylist "CMlist" using the deletehumanresources() method.

also load the resources from the file and add to the list cmlist using loadhumanresources too and also print..

the below code must delete the resources added to the arraylist "CMlist"

using the deletehumanresources() method. also load the resources from the file and

add to the list cmlist using loadhumanresources too and also print.. importjava.io.*; import java.util.*; public class CMS implements Serializable 1 String FILENAMEcms; private

import java.io.*; import java.util.*; public class CMS implements Serializable 1 String FILENAMEcms; private File file; private ArrayList CMlist = new ArrayList(); ArrayList printlist = new ArrayList(); ArrayList temp = new ArrayList(); Scanner innne - new Scanner(System.in); public CMS() { CMlist = new ArrayList(); FILENAMECM = "temfile.dat";// the name of the file for reservation file = new File(FILENAMEcms); } public CMS(String filename) { CMlist = new ArrayList(); FILENAMEms = filename; file = new File(FILENAMEcms); } public void addcmsResource(String tYPE) { // it adds to the list if (tYPE.toLowerCase().matches ("teacher"))// associate to the teacher class using the interfaces {// this method only adds the cms resources to the list and then asks in the main 1/ program to save the resources to file or not! cmsteacher teac = new cmsteacher(); CMlist.add(teac. Resourceutilizer(); } else if (tYPE.toLowerCase().matches ("student")) { Student student = new Student(); CMlist.add(student. ResourceUtilizer(); } } CMlist.add(student. ResourceUtilizer(); } } public void delcms Resource(String id) throws IOException, FileNotFoundException, NullPointerException { for (int i = 0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!