Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are working on an application that needs to print a report card for all students on campus. You will have various number of lists

You are working on an application that needs to print a report card for all students on campus. You will have various number of lists (all with the same order of information such as last name, first name, etc.). Your job is to write a program that reads in all of that information, and your goal is not to print duplicate report cards.

Which is the best choice for collecting this student information? And you don't care about order.

a. Read all student data in each file, and store them in a ArrayList

b. Read all student data in each file, and store them in a TreeSet

c. Read all student data in each file, and store them in an Array

d. Read all student data in each file, and store them in a HashSet

2/

public class Teams extends ArrayList

{

public Teams() { ... }

public getTeamName() { ... }

public boolean addTeamName(String name) { ... }

}

What is the best way to perform the adding of the Team name?

a. Create a class member variable that is ArrayList, and use that variable to call the add method.

b. Use the add method from the parent class

c. Create a global ArrayList variable and use that variable to call the add method.

d. Create a class member variable that is ArrayList, and then use the add method from the parent class.

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

Step: 3

blur-text-image

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

DB2 11 The Ultimate Database For Cloud Analytics And Mobile

Authors: John Campbell, Chris Crone, Gareth Jones, Surekha Parekh, Jay Yothers

1st Edition

ISBN: 1583474013, 978-1583474013

More Books

Students also viewed these Databases questions

Question

Define policy making?

Answered: 1 week ago

Question

Define co-ordination?

Answered: 1 week ago

Question

What are the role of supervisors ?

Answered: 1 week ago