Note: you don\'t need to write any code for this problem. Please draw a data str
ID: 3868220 • Letter: N
Question
Note: you don't need to write any code for this problem. Please draw a data structure graph to meet the following requirementsThe information kept by the Multi-Institution Student Transfer System is as follows.
For students:
student last name and first name, student mailing address, student email address, name of home institution (the institution from which the student is transferring), student number from home institution, name of transfer institution (the institution to which the student is transferring), faculty to which the student is applying (e.g.: Science, Applied Science, etc...), programs into which the student is applying (e.g.: Math Major and/or Physics Minor and/or etc...).
For institution:
institution name, institution mailing address, email address of the institution's Registrar's Office, phone number of the institution's Registrar's Office, a listing of all students information (see students above) transferring to this institution, a listing of all students information (see students above) transferring from this institution.
Note that the information listed above can be used as data members for a class Student and a class Institution. We may also need to add more data members to these classes in order to satisfy the requirements listed below.
Requirements
This group of Canadian institutions has asked us to design this Multi-Institution Student Transfer System, keeping in mind their requirements.
When the Multi-Institution Student Transfer System start executing, it allows the administrative staff in the Registrar's Office of a Canadian university or college to identify an institution by entering a piece of information related to this institution. As the designer of this Multi-Institution Student Transfer System, we must select which information related to an institution the administrative staff is to enter (see listing of information related to institution above). Once the administrative staff have identified the institution on which they wish to focus their enquiries (by entering a piece of information related to this institution), the Multi-Institution Student Transfer System then allows the administrative staff to do any of the following actions:
Display all the information related to this institution in O(1). Display the number of students transferring to this institution in O(1). Display the number of students transferring from this institution in O(1). Modify some information related to this institution in O(1). Note that only the information related to this institution that is not used to identify this institution within the Multi-Institution Student Transfer System can be modified. Display all students transferring to this institution, by ascending alphabetical sort order of last name, in O(n) where n is the number of students transferring to this institution. Display all students transferring from this institution, by descending numerical sort order of student number, in O(m) where m is the number of students transferring from this institution. Insert a student transferring to this institution in O(log2 n) where n is the number of students transferring to this institution, using the student's last name. Insert a student transferring from this institution in O(m) (worst case scenario) where m is the number of students transferring from this institution, using the student's student number. Given a student's last name, modify all information related to this student transferring to this institution (except her/his last name) in O(1). Given a student's last name, display all information related to a student transferring to this institution in O(1). Given a student's student number, modify all information related to this student transferring from this institution (except her/his student number) in O(1). Given a student's student number, display all information related to a student transferring from this institution in O(1). Note: During the execution of the Multi-Institution Student Transfer System, removal of institution and student objects are never performed.
Note: you don't need to write any code for this problem. Please draw a data structure graph to meet the following requirements
The information kept by the Multi-Institution Student Transfer System is as follows.
For students:
student last name and first name, student mailing address, student email address, name of home institution (the institution from which the student is transferring), student number from home institution, name of transfer institution (the institution to which the student is transferring), faculty to which the student is applying (e.g.: Science, Applied Science, etc...), programs into which the student is applying (e.g.: Math Major and/or Physics Minor and/or etc...).
For institution:
institution name, institution mailing address, email address of the institution's Registrar's Office, phone number of the institution's Registrar's Office, a listing of all students information (see students above) transferring to this institution, a listing of all students information (see students above) transferring from this institution.
Note that the information listed above can be used as data members for a class Student and a class Institution. We may also need to add more data members to these classes in order to satisfy the requirements listed below.
Requirements
This group of Canadian institutions has asked us to design this Multi-Institution Student Transfer System, keeping in mind their requirements.
When the Multi-Institution Student Transfer System start executing, it allows the administrative staff in the Registrar's Office of a Canadian university or college to identify an institution by entering a piece of information related to this institution. As the designer of this Multi-Institution Student Transfer System, we must select which information related to an institution the administrative staff is to enter (see listing of information related to institution above). Once the administrative staff have identified the institution on which they wish to focus their enquiries (by entering a piece of information related to this institution), the Multi-Institution Student Transfer System then allows the administrative staff to do any of the following actions:
Display all the information related to this institution in O(1). Display the number of students transferring to this institution in O(1). Display the number of students transferring from this institution in O(1). Modify some information related to this institution in O(1). Note that only the information related to this institution that is not used to identify this institution within the Multi-Institution Student Transfer System can be modified. Display all students transferring to this institution, by ascending alphabetical sort order of last name, in O(n) where n is the number of students transferring to this institution. Display all students transferring from this institution, by descending numerical sort order of student number, in O(m) where m is the number of students transferring from this institution. Insert a student transferring to this institution in O(log2 n) where n is the number of students transferring to this institution, using the student's last name. Insert a student transferring from this institution in O(m) (worst case scenario) where m is the number of students transferring from this institution, using the student's student number. Given a student's last name, modify all information related to this student transferring to this institution (except her/his last name) in O(1). Given a student's last name, display all information related to a student transferring to this institution in O(1). Given a student's student number, modify all information related to this student transferring from this institution (except her/his student number) in O(1). Given a student's student number, display all information related to a student transferring from this institution in O(1). Note: During the execution of the Multi-Institution Student Transfer System, removal of institution and student objects are never performed.
The information kept by the Multi-Institution Student Transfer System is as follows.
For students:
student last name and first name, student mailing address, student email address, name of home institution (the institution from which the student is transferring), student number from home institution, name of transfer institution (the institution to which the student is transferring), faculty to which the student is applying (e.g.: Science, Applied Science, etc...), programs into which the student is applying (e.g.: Math Major and/or Physics Minor and/or etc...).
For institution:
institution name, institution mailing address, email address of the institution's Registrar's Office, phone number of the institution's Registrar's Office, a listing of all students information (see students above) transferring to this institution, a listing of all students information (see students above) transferring from this institution.
Note that the information listed above can be used as data members for a class Student and a class Institution. We may also need to add more data members to these classes in order to satisfy the requirements listed below.
Requirements
This group of Canadian institutions has asked us to design this Multi-Institution Student Transfer System, keeping in mind their requirements.
When the Multi-Institution Student Transfer System start executing, it allows the administrative staff in the Registrar's Office of a Canadian university or college to identify an institution by entering a piece of information related to this institution. As the designer of this Multi-Institution Student Transfer System, we must select which information related to an institution the administrative staff is to enter (see listing of information related to institution above). Once the administrative staff have identified the institution on which they wish to focus their enquiries (by entering a piece of information related to this institution), the Multi-Institution Student Transfer System then allows the administrative staff to do any of the following actions:
Display all the information related to this institution in O(1). Display the number of students transferring to this institution in O(1). Display the number of students transferring from this institution in O(1). Modify some information related to this institution in O(1). Note that only the information related to this institution that is not used to identify this institution within the Multi-Institution Student Transfer System can be modified. Display all students transferring to this institution, by ascending alphabetical sort order of last name, in O(n) where n is the number of students transferring to this institution. Display all students transferring from this institution, by descending numerical sort order of student number, in O(m) where m is the number of students transferring from this institution. Insert a student transferring to this institution in O(log2 n) where n is the number of students transferring to this institution, using the student's last name. Insert a student transferring from this institution in O(m) (worst case scenario) where m is the number of students transferring from this institution, using the student's student number. Given a student's last name, modify all information related to this student transferring to this institution (except her/his last name) in O(1). Given a student's last name, display all information related to a student transferring to this institution in O(1). Given a student's student number, modify all information related to this student transferring from this institution (except her/his student number) in O(1). Given a student's student number, display all information related to a student transferring from this institution in O(1). Note: During the execution of the Multi-Institution Student Transfer System, removal of institution and student objects are never performed.
The information kept by the Multi-Institution Student Transfer System is as follows.
For students:
student last name and first name, student mailing address, student email address, name of home institution (the institution from which the student is transferring), student number from home institution, name of transfer institution (the institution to which the student is transferring), faculty to which the student is applying (e.g.: Science, Applied Science, etc...), programs into which the student is applying (e.g.: Math Major and/or Physics Minor and/or etc...).
For institution:
institution name, institution mailing address, email address of the institution's Registrar's Office, phone number of the institution's Registrar's Office, a listing of all students information (see students above) transferring to this institution, a listing of all students information (see students above) transferring from this institution.
Note that the information listed above can be used as data members for a class Student and a class Institution. We may also need to add more data members to these classes in order to satisfy the requirements listed below.
Requirements
This group of Canadian institutions has asked us to design this Multi-Institution Student Transfer System, keeping in mind their requirements.
When the Multi-Institution Student Transfer System start executing, it allows the administrative staff in the Registrar's Office of a Canadian university or college to identify an institution by entering a piece of information related to this institution. As the designer of this Multi-Institution Student Transfer System, we must select which information related to an institution the administrative staff is to enter (see listing of information related to institution above). Once the administrative staff have identified the institution on which they wish to focus their enquiries (by entering a piece of information related to this institution), the Multi-Institution Student Transfer System then allows the administrative staff to do any of the following actions:
Display all the information related to this institution in O(1). Display the number of students transferring to this institution in O(1). Display the number of students transferring from this institution in O(1). Modify some information related to this institution in O(1). Note that only the information related to this institution that is not used to identify this institution within the Multi-Institution Student Transfer System can be modified. Display all students transferring to this institution, by ascending alphabetical sort order of last name, in O(n) where n is the number of students transferring to this institution. Display all students transferring from this institution, by descending numerical sort order of student number, in O(m) where m is the number of students transferring from this institution. Insert a student transferring to this institution in O(log2 n) where n is the number of students transferring to this institution, using the student's last name. Insert a student transferring from this institution in O(m) (worst case scenario) where m is the number of students transferring from this institution, using the student's student number. Given a student's last name, modify all information related to this student transferring to this institution (except her/his last name) in O(1). Given a student's last name, display all information related to a student transferring to this institution in O(1). Given a student's student number, modify all information related to this student transferring from this institution (except her/his student number) in O(1). Given a student's student number, display all information related to a student transferring from this institution in O(1). Note: During the execution of the Multi-Institution Student Transfer System, removal of institution and student objects are never performed.
Explanation / Answer
import java.io.*;
public class addstud {
public addstud()
{
}
public void addnew()throws Exception
{
BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
BufferedReader readFile=new BufferedReader(new FileReader("Studinfo.itp"));
BufferedWriter writeFile=new BufferedWriter(new FileWriter("Studinfo.itp",true));
String fn,cs;
System.out.println("Enter Student number:");
String sn=input.readLine();
System.out.println("Enter Fullname:");
fn=input.readLine();
System.out.println("Enter Course & Section");
cs=input.readLine();
int lineNum=0;
String line;
while((line=readFile.readLine())!=null)
{
lineNum++;
if(line.equals("Student number:" + sn))
{
System.out.println("Inputted student number already exists.");
break;
}
else
{
writeFile.newLine();
writeFile.write("Student number:" + sn);
writeFile.newLine();
writeFile.write("Fullname:" + fn);
writeFile.newLine();
writeFile.write("Course & Section:" + cs);
System.out.println(sn +" " + fn + " " + cs + " " + " student info successfully written to textfile.");
break;
}
}
writeFile.close();
readFile.close();
}
}
package david;
public class Student
{
private String name;
private int age;
private int year;
private String studentNum;
public Student(String name, int age, int year, String studentNum)
{
this.name = name;
this.age = age;
this.year = year;
this.studentNum = studentNum;
}
// Setters and getters (Name, Age, Year and Student Number)
public String getName() // name
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public int getAge() // age
{
return age;
}
public void setAge(int age)
{
this.age = age;
}
public int getYear() // year
{
return year;
}
public void setYear(int year)
{
this.year = year;
}
public String getstudentNum() // studentNum
{
return studentNum;
}
public void setstudentNum(String studentNum)
{
this.studentNum = studentNum;
}
}
package david;
// David Needham - G00263842.
// Student information program.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class TestStudents
{
public static void main(String[] args) throws IOException
{
System.out.println("============" + "=================");
System.out.println("Students " + "Personal Details");
System.out.println("============" + "=================");
String name;
int age;
int year;
String studentNum;
List<Student> studentsList = new ArrayList<Student>();
for (int i = 0; i < 2; i++)
{
int studentNumber = (i + 1);
System.out.println("");
System.out.println("Please enter " + "data for student " + studentNumber);
InputStreamReader converter = new InputStreamReader(System.in);
BufferedReader in = new BufferedReader(converter);
System.out.println("Enter Student "+ studentNumber + " Name:");
name = in.readLine();
System.out.println("Enter Student " + studentNumber + " Age (Integer):");
age = Integer.valueOf(in.readLine());
System.out.println("Enter Student " + studentNumber + " Year (Integer):");
year = Integer.valueOf(in.readLine());
System.out.println("Enter Student " + studentNumber + " Student Number:");
studentNum = in.readLine();
Student student = new Student(name, age, year, studentNum);
studentsList.add(student); // add student
}
for (int j = 0; j < studentsList.size(); j++)
{
Student st = studentsList.get(j);
System.out.println("Student : " + (j + 1));
System.out.println("Name: " + st.getName() + " - Age: " + st.getAge() + " - Year: " + st.getYear() + " - Student Number: " + st.getstudentNum());
}
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.