Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

7.2.8 Teacher class list Output Run Connect Connected 7.2.8 Teacher Class List Submit Continue 5 ve 1 public class ClassListTester 2.1 3 public static void

7.2.8 Teacher class list
image text in transcribed
image text in transcribed
image text in transcribed
Output Run Connect Connected 7.2.8 Teacher Class List Submit Continue 5 ve 1 public class ClassListTester 2.1 3 public static void main(String[] args) 4- { 5 //You don't need to change anything here, but feel free to add more Students! 6 Student alan - new Student("Alan", 11); Student kevin - new Student("Kevin", 10); Student annie new Student("Annie", 12); 9 System.out.println(Student.printClassListO); 10 11 12 13 14 } 15 Out Check Code 72.8 Teacher Class List 1 import java.util.ArrayList; 2 public class Student 3- { private String nome; private int grade: /tmplement classlist heres B public Student(String name, int grade) 9 { this.no-none; this.grade grade; City dhara } public String getName return this.nome HH% 15 26 17 18 19 20 21 22 23 24 /*Don't change the code in this method This method will print out all the Student names in the classtist Array 7 public static String printClosslisto String names: for Student none! classlist) { nanes nome.getName": retum Student Class List: " names; 32 1 ID Resume 19 BRODY CLAYTON ontinue Save Output Test Cases Docs Assignment Grade More 5 points Status: Not Submitted A teacher wants to create a list of students in her class Using the existing Student class in this exercise. Create a static ArrayList called classlist that adds a student to the class ist whenever a new Student is created In the constructor, you will have to add that Student to the ArrayList. 3- ped 577

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions

Question

Explain the concept of shear force and bending moment in beams.

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago