
Create student object class (Student.java)
- Student objects should have the following attributes:
- student name
- major
- class name
- course id
- grade
- credits
Create Course object class (Course.java)
- Course object should be the following attributes:
- course id
- instructor id
- room id
Create testStudent class
- Output
- Create a report that has appropriate headings and 1 line of detail for each student record read in. Detail lines should include the following information:
- student name,
- class id,
- Instructor id,
- room id,
- grade,
- credits,
- comment
- Read student information, process the information and print an output line for each student record in the ClassesData.dat file. You will also need the CoursesData.dat file for courses information.
- A second version of the data is available. You can use either version of these files. Just be sure to zip the data files your program solution uses, with your submission: NewCoursesData.txt , NewClassesData.txt
The comments section of the detail line should display the String "Great Job!" if the student gets an 'A' grade.
Zip these five files into 1 zipped file named <yourlastname>Final(example watneFinal):
- Student.java
- Course.java
- testStudent.java
- ClassesData.dat
- CoursesData.dat.
Submit the zipped file as an attachment.
ClassesData.dat:
1001Intro. to CompSci 4ALBERT, PETER A. Comp Info System A
1001Intro. to CompSci 4ALLENSON, SHEILA M. Comp Info System B
1001Intro. to CompSci 4ANDERSON, ALENE T. Comp Info System A
1001Intro. to CompSci 4HENDRIX, JAMES D. Lib Arts - MIS C
1001Intro. to CompSci 4CANNON, FREDDY B.B. Comp Info System B
1002Visual Basic 3ALBERT, PETER A. Comp Info System C
1002Visual Basic 3ALLENSON, SHEILA M. Comp Info System D
1002Visual Basic 3ANDERSON, ALENE T. Comp Info System A
1002Visual Basic 3HENDRIX, JAMES D. Lib Arts - MIS B
1002Visual Basic 3CANNON, FREDDY B.B. Comp Info System B
1003Cisco Networking I 4ALBERT, PETER A. Comp Info System C
1003Cisco Networking I 4ALLENSON, SHEILA M. Comp Info System A
1003Cisco Networking I 4ANDERSON, ALENE T. Comp Info System A
1003Cisco Networking I 4HENDRIX, JAMES D. Lib Arts - MIS D
1004Cisco Networking III3ALBERT, PETER A. Comp Info System B
1004Cisco Networking III3ALLENSON, SHEILA M. Comp Info System C
1004Cisco Networking III3ANDERSON, ALENE T. Comp Info System A
1004Cisco Networking III3CANNON, FREDDY B.B. Comp Info System B
1004Cisco Networking III3HELLER, HELEN H. Lib Arts - MIS A
1004Cisco Networking III3HENDRIX, JAMES D. Lib Arts - MIS F
CoursesData.dat:
1001WATNE BABCOCK134
1002KROSHUS HORTON30
1003SCHILLINGER LIBRARY118
1004SCHWANTZ BABCOCK134
I have two pictures. The first picture, that error appears when I try to run the Java application for the Student.java and Course.java.
The second picture, errors I receive when trying to compile the testStudent.java. I presume I'll probably get the same error as the Student and Course so I would like that fixed as well.
![Document Selector
testStudent.java x
testStudent.java
package package1;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class testStudent {
public static void main(String[] args) {
Student students[] = new Student[25];
Course courses[] = new Course[5];
String s_name, major, class_name, instructor_id, room_id;
int cou_id, credits, index, stud_count = , cou_count
char grade;
try {
File fclasses = new File("E://ClassesData.dat");
Scanner myReader
= 0;
= new Scanner (fclasses);
while (myReader.hasNextline()) {
String data = myReader.nextLine();
String[] toks
cou_id = Integer.parseInt (toks[0].substring(0, 4));
class_name =
for (index - 1;; index++) {
if (Character.isDigit(toks[index].charAt(0)))
break;
else {
class_name +=
}
}
data.split("\\s+");
%3D
toks[0].substring(4);
+ toks[index];
credits = Integer.parseInt (toks[index].substring (0, 1));
toks[index].substring (1);
for (index = index + 1;; index++) {
s_name =
Ca Expl. 9 Docu. Clip .
Tool Output
symbol:
location: class testStudent
class Student
C: \Users\Alyssa\Documents\CSCI 160\packagel\testStudent.java:9: error: cannot find symbol
Student students[]
= new Student[25];](https://content.bartleby.com/qna-images/question/859cbc42-a46d-4010-ba0f-00da25d9d32e/02f2bc0d-eaf5-4038-80bd-278e77b0d63e/f4fcb5l_thumbnail.png)
![Course.java X
C:\WINDOWS\system32\cmd.exe
package package1;
public_stat ic void main(Stringl] args)
or a JavaFX applicat ion class must extend javafx.applicat ion. Applicat ion
public class Course {
Press any key to cont inue . . .
int cou id;
String inst_id, room_id;
public Course() {
cou_id = 0;
inst_id = room_id = "";
}
public void assign(int course_id, String instructor_id, String room_id) {
this.cou_id = course_id;
this.inst_id = instructor_id;
this.room id = room id;
}
public boolean match_course_id(int stud_course_id) {
if (this.cou_id -- stud_course_id) {
System.out.println("Instructor Id: " + this.inst_id);
System.out.println("Room Id: " + this.room_id);
return true;
}
return false;](https://content.bartleby.com/qna-images/question/859cbc42-a46d-4010-ba0f-00da25d9d32e/02f2bc0d-eaf5-4038-80bd-278e77b0d63e/bqm7pru_thumbnail.png)

Trending nowThis is a popular solution!
Step by stepSolved in 6 steps with 4 images

- a) TEMPID (Corp-ID = "Amawig") (works) b) TEMPID, City (Employee ▷ (corpan = " Amouig" (works)) c) TEmpID, City (CorpID="Amoudig" A Salary > 100000) works Employee d) EmpIn (Employee works Corporation) e) TEMPID ((Employee Amonages) MngrID = employee 2. EmpID A employee-Zipcode · Employce 2. zipcode ^ Employee.City = Employee 2. City) (Pemployeez (Employee)))arrow_forwardAfter executing the following piece of code: z = 25 + 10j print(z.real) z = "apple" print(z.imag) what will we get? Select one: A. 10 0 B. 25 AttributeError Traceback (most recent call last) in () 3 z="apple" ----> 4 print(z.imag) AttributeError: 'str' object has no attribute 'imag' C. 25 0arrow_forwardActivity name: activity_main.xmlJava File: MainActivity.javaWrite the code needed to initialize binding variable in OnCreate method in MainActivity.java file.arrow_forward
- Assignment 1 question Fruit class:First create a Fruit class that contains code common to all of the fruits.1. Fruit class has two data fields called color and seed.2. A private data field called season. 3. Three constants named SUMMER, WINTER, and AUTUMN to denote the season.4. The accessor and mutator methods for all three data fields.Apple class:Apple class is a subclass of Fruit. 1. Write a class called Apple which extends the Fruit class.2. Apples are produced in Winter season.3. Declare a data field called varieties. There are three varieties:a. Ciderb. Cookingc. Dessert 4. A method named toString () that returns a string description for the Apple. Mango class:Mango class is a subclass of Fruit. 1. Write a class called Mango which extends the Fruit class.2. Mangoes are produced in Summer season.3. Declare a data field called propagation. There are two ways:a. graftingb. budding 4. A method named toString () that returns a string description for the Mango. UML Diagram:Draw a UML…arrow_forwardLook at the code below and use the following comments to incdicate the scope of the static variables or functions. Place the comment below the relevant line. Module scope Class scope Function scope The code runs. Use onlinegdb.com to see it run. Module scope means global but only known in this source file. Class scope means global but only known by the class. Function scope means global but only known in the function. Hide Comments 1 #include 2 static const int MAX_SIZE=10; 5 // Return the max value 6 static double max(double d1) 7 { static double lastMax = 0; lastMax = (di > lastMax) ? di : lastMax; return lastMax; 8 10 11 } 12 13 // singleton class only one instance allowed 14 class singleton 15 { public: static Singleton& getsingleton() { return theone; } // Returns the Singleton 16 17 18 19 20 friend std::ostream& operator<< (std::ostream& o, const Singleton& s); private: Singleton() { }; // Prevents more instances 21 22 23 24 25 static Singleton theone; 26 }; 27 Singleton…arrow_forwardCOURSE CRS_CODE DEPT_CODE CRS_DESCRIPTION CRS_CREDIT CLASS CLASS_CODE CRS_CODE CLASS_SECTION CLASS_TIME CLASS ROOM PROF_NUM 00 ENROLL CLASS_CODE STU_NUM ENROLL_GRADE STUDENT STU_NUM STU_LNAME STU_FNAME STU_INIT STU_DOB STU_HRS STU_CLASS STU_GPA STU_TRANSFER DEPT_CODE STU_PHONE PROF_NUM Review the relational diagram above and briefly describe the following in one sentence. 1. How would you extend this database to identify the Professor who taught a class? 2. How would you extend this database to identify the Department that had a course?arrow_forward
- 1.Problem Description Student information management system is used to input, display student information records. 1. The GUI interface for inputing ia designed as follows: The top part are the student imformation used to input student information, and the bottom part are four buttonns, 2. each button meaning: 3. (2) Total: add java score and C++ score, and display the result; 4. (3) Save: save student record into file named student.dat; 5. (4) Clear: set all fields on GUI to empty string: 6. (5) Close: close the window of GUI Student ID: Java Score: Note: Total Student ID: BC501 Java Score: 80 Note: He study java hard. Total Student Management System Student name: C++ Score: Save C++ Score: 90.5 Student Management System Student name: ALVIN CARM Save Total scores: Clear Sex Clear D E Male Female Close Sex Male Female Total scores: 170.5 Closearrow_forwardCar Class Project The car classwill havethe following attributes: •year: an integer that holds the car's model year •model: a string that holds the make of the car •make: a string that holds the model of the car •speed: an integer that holds the car's current speed Your class should contain thefollowing: A docstring that briefly describes the class and lists the attributes. The docstring will serve as the documentation for your class. •A constructor (__init__ method) that takes the car's year model and make as optional arguments. The constructor will set the value of the speed attribute to 0.•An __str__ method that returns the car's year model and makein a string. •To test your class, create acar object and use the print function to verify that the constructor and __str__ methodsare working correctly. •An accessor method which returns the value stored in the speed instance variable. Call this method getSpeed(). •A modifier method called accelerate() which adds 5 to the speed variable…arrow_forwardData may be stored in the attributes field of objects. The class's characteristics are the class's own.?arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





