menu
QAmmunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
Register
Ask a Question
Questions
Unanswered
Tags
Categories
Ask a Question
To be done in Java - Create a class called Country.java. - Instance variables include name (String), capital (String), and population (an int representing the population of the capital) - Write a 3-arg
asked
Sep 22, 2024
29.4k
views
3
votes
To be done in Java
- Create a class called Country.java.
- Instance variables include name (String), capital (String), and population (an int representing the population of the capital)
- Write a 3-arg constructor
- Write 3 accessor methods
- Write a toString method that returns the state/value of all instance variables.
- Test out your class:
- Step 1: Create an ArrayList of five countries.
- Step 2: Print out your ArrayList.
- Step 3: Remove one of the countries.
- Step 4: Print out your ArrayList again.
- Step 5: Create a new country and insert it in the middle of your ArrayList.
- Step 7: Print out your ArrayList again.
- Step 8: Change your last country to the country you removed in Step 3.
- Step 9: Print out your ArrayList again.
Computers and Technology
college
Tom Nijs
asked
by
Tom Nijs
7.6k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
4
votes
i dont why i cant post it here.
check the comment section.
Rijin
answered
Sep 26, 2024
by
Rijin
7.7k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.0m
questions
11.6m
answers
Other Questions
The book shows how to add and subtract binary and decimal numbers. However, other numbering systems are also very popular when dealing with computers. The octal (base 8) numbering system is one of these.
Seven basic internal components found in a computer tower
Please help me ! All you do is just put it it all in your own words ! Please this is for my reported card!i don't know how to put it in my own words because my English is not that good!
Disadvantages of using animation in advertising? advantages and disadvantages of using animation for education? advantages and disadvantages of using animation in entertainment?
Explain why binary codes are used to represent characters, numbers and symbols :)
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search QAmmunity.org