For the final take on this problem, we will use a class to solve the problem by reading the data from a text file. Prepare the text file as you wish if you can read it within your Java project. Name the 4Growth.txt. Don’t forget to close the file after you finish reading it! Create a new Java Project named PopCan04. Include a Jurisdiction class according to this UML diagram: You already have several pieces of its solution, the header is the same, the format specifiers are the same, now, instead of using arrays, use an Array[] or an ArrayList<> of Jurisdictions to implement the new solution. Be sure to include a method to calculate the population growth as defines in the class diagram. Since you will be reading from a file, include a FileNotFoundException and catch it by printing a message to the user: “File not Found.” The rest of the solution needs an enhanced for loop to produce the table. Finish by adding the footer that you have been using all along. ***Population of provinces and territories*** ***April 4, 2023*** --------------------------------------------------------------------------- Rank Provinces and Territories Population 2023 Population 2016 Change =========================================================================== 1 Yukon 44,291 35,874 +23.46% 2 Prince Edward Island 175,766 142,907 +22.99% 3 British Columbia 5,426,742 4,648,055 +16.75% 4 Alberta 4,685,807 4,067,175 +15.21% 5 Ontario 15,485,590 13,448,494 +15.15% 6 Nunavut 40,816 35,944 +13.55% 7 Nova Scotia 1,042,922 923,598 +12.92% 8 Manitoba 1,435,382 1,278,365 +12.28% 9 New Brunswick 829,114 747,101 +10.98% 10 Saskatchewan 1,218,815 1,098,352 +10.97% 11 Northwest Territories 45,189 41,786 +8.14% 12 Quebec 8,807,385 8,164,361 +7.88% 13 Newfoundland and Labrador 532,870 519,716 +2.53% =========================================================================== Total CANADA 39,770,689 35,151,728 +13.14% By A. E Be sure to use first and last name.

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter4: The Selection Structure
Section: Chapter Questions
Problem 5MQ2: What is the opposite of greater than?
icon
Related questions
Question
For the final take on this problem, we will use a class to solve the problem by reading the data
from a text file. Prepare the text file as you wish if you can read it within your Java project.
Name the 4Growth.txt. Don’t forget to close the file after you finish reading it!
Create a new Java Project named PopCan04. Include a Jurisdiction class according to this UML
diagram:
You already have several pieces of its solution, the header is the same, the format specifiers are
the same, now, instead of using arrays, use an Array[] or an ArrayList<> of Jurisdictions to
implement the new solution. Be sure to include a method to calculate the population growth as
defines in the class diagram.
Since you will be reading from a file, include a FileNotFoundException and catch it by printing a
message to the user: “File not Found.”
The rest of the solution needs an enhanced for loop to produce the table. Finish by adding the
footer that you have been using all along.

***Population of provinces and territories***
***April 4, 2023***
---------------------------------------------------------------------------
Rank Provinces and Territories Population 2023 Population 2016 Change
===========================================================================
1 Yukon 44,291 35,874 +23.46%
2 Prince Edward Island 175,766 142,907 +22.99%
3 British Columbia 5,426,742 4,648,055 +16.75%
4 Alberta 4,685,807 4,067,175 +15.21%
5 Ontario 15,485,590 13,448,494 +15.15%
6 Nunavut 40,816 35,944 +13.55%
7 Nova Scotia 1,042,922 923,598 +12.92%
8 Manitoba 1,435,382 1,278,365 +12.28%
9 New Brunswick 829,114 747,101 +10.98%
10 Saskatchewan 1,218,815 1,098,352 +10.97%
11 Northwest Territories 45,189 41,786 +8.14%
12 Quebec 8,807,385 8,164,361 +7.88%
13 Newfoundland and Labrador 532,870 519,716 +2.53%
===========================================================================
Total CANADA 39,770,689 35,151,728 +13.14%
By A. E Be sure to use first and last name.
 
 
Jurisdiction
-name:String
-pop16:int
-pop23:int
+calculate Change:double
Transcribed Image Text:Jurisdiction -name:String -pop16:int -pop23:int +calculate Change:double
Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

what do you mean by this "Make sure to replace the file path in File file = new File("4Growth.txt"); with the correct path to your text file. This code reads the data from the file, creates Jurisdiction objects, calculates the change, and prints the table with the same formatting as before. It also handles the FileNotFoundException if the file is not found." and is there 2 classes to the project? why did you include the together

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr