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
- Each Country object of the Country class should know (state)
- its name
- its area (in square miles)
- iii. its population
- Each Country object should be able to (behavior)
- set initial population (setter)
- get density (number of people per square mile) (getter)
- iii.adjust the set population by some amount (setter)
- 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
Get step-by-step solutions from verified subject matter experts
