subject
Computers and Technology, 24.04.2020 19:54 chops85

I AM IN NEED OF HELP AND CANT DO COMPUTER SCIENCE TO SAVE MY LIFE PLEASE HELP!
ArrayList Card Collector

Directions: SHOW ALL YOUR WORK. REMEMBER THAT PROGRAM SEGMENTS ARE TO BE WRITTEN IN Java.

Notes:
Assume that the classes listed in the Quick Reference have been imported where needed.
Unless otherwise noted in the question, assume that parameters in method calls are not null and that methods are called only when their preconditions are satisfied.
In writing solutions for each question, you may use any of the accessible methods that are listed in classes defined in that question. Writing significant amounts of code that can be replaced by a call to one of these methods may not receive full credit.

Consider this implementation of the class Card, that stores information related to a cards monetary value, name, condition, and number in a set of collectible cards:

public class Card
{
private double value;
private String name;
private int setNum;
private String condition;

public Card (String Name, String Condition, double Value, int numSet){
name = Name;
condition = Condition;
value = Value;
setNum = numSet;
}

public String getName(){
return name;
}

public String getCondition(){
return condition;
}

public double getValue(){
return value;
}

public int getSetNum(){
return setNum;
}
}

QUESTIONS :

A subsequent class CardCollection has been created with the instance variable ArrayList collection that stores a collection of cards. When instantiated, the CardCollection class takes an ArrayList as a parameter, and copies that ArrayList to the Collection instance variable. In this question, you will write three methods in the CardCollection class.

A) Write a method totalValue() which returns the total value of all cards in a card collection.

B) Write a method checkPerfect() that prints the name of the Cards in a collection that are in "perfect" condition.

C) Write a method orderNumerically() that reorders the ArrayList collection in numerical order by set number. Assume that the set includes 151 cards.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 15:00, yeet74
I'm taking a class on how to make a movie, and it offers some apps that would be in the process. the thing is, i don't have any of those ha. if you have any tips on some apps i could use, that would be awesome. i don't have an iphone, so don't suggest any apps like imovie. i know that this is a weird question, but it would be super for me. : )
Answers: 2
image
Computers and Technology, 22.06.2019 17:30, kallee10
The forerunner to cell phones, pdas, and smartphones was
Answers: 1
image
Computers and Technology, 24.06.2019 01:00, bellamyciana
What are two ways to access the options for scaling and page orientation? click the home tab, then click alignment, or click the file tab. click the file tab, then click print, or click the page layout tab. click the page layout tab, or click the review tab. click the review tab, or click the home tab?
Answers: 2
image
Computers and Technology, 24.06.2019 11:00, iloveballet1857
Each row in a database is a set of unique information called a(n) ? a.) table. b.) record. c.) object. d.) field.
Answers: 2
You know the right answer?
I AM IN NEED OF HELP AND CANT DO COMPUTER SCIENCE TO SAVE MY LIFE PLEASE HELP!
ArrayList Card...

Questions in other subjects:

Konu
History, 24.04.2020 00:57
Konu
Computers and Technology, 24.04.2020 00:57