Question: Create ONE javafile in Dr.Java according the specifications below: A.Create a Country class Each Country object of the Country class should know (state) its name

Create ONE javafile in Dr.Java according the specifications below:

A.Create a Country class

  1. Each Country object of the Country class should know (state)
  2. its name
  3. its area (in square miles)
  4. iii. its population
  5. Each Country object should be able to (behavior)
  6. set initial population (setter)
  7. get density (number of people per square mile) (getter)
  8. iii.adjust the set population by some amount (setter)
  9. iv.provide its name, area, and population (toString() using getterssee below*)

B.In the main() method, create at least two Country objects and make sure each object usesALL methods from the Country class.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!