Question: Please complete the java code below Java code: import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws FileNotFoundException { String

Please complete the java code below

Java code:

import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws FileNotFoundException { String fileName = "declarationLast.txt"; fillTheSets(fileName); } public static void fillTheSets(String fn) throws FileNotFoundException { Scanner file = new Scanner(new File(fn)); //add your code here } }

declarationLast.txt file:

We, therefore, the Representatives of the united States of

America, in General Congress, Assembled, appealing to the

Supreme Judge of the world for the rectitude of our intentions,

do, in the Name, and by the Authority of the good People of

these Colonies, solemnly publish and declare, That these United

Colonies are, and of Right ought to be Free and Independent

States; that they are Absolved from all Allegiance to the

British Crown, and that all political connection between them

and the State of Great Britain, is and ought to be totally

dissolved; and that as Free and Independent States, they have

full Power to levy War, conclude Peace, contract Alliances,

establish Commerce, and to do all other Acts and Things which

Independent States may of right do. And for the support of this

Declaration, with a firm reliance on the protection of divine

Providence, we mutually pledge to each other our Lives, our

Fortunes and our sacred Honor.

Expected Output:

We, therefore, the Representatives of the united States of

Lower Case: [a, d, e, f, h, i, n, o, p, r, s, t, u, v]

Upper Case: [R, S, W]

Other: [ , ,]

America, in General Congress, Assembled, appealing to the

Lower Case: [a, b, c, d, e, g, h, i, l, m, n, o, p, r, s, t]

Upper Case: [A, C, G]

Other: [ , ,]

Supreme Judge of the world for the rectitude of our intentions,

Lower Case: [c, d, e, f, g, h, i, l, m, n, o, p, r, s, t, u, w]

Upper Case: [J, S]

Other: [ , ,]

do, in the Name, and by the Authority of the good People of

Lower Case: [a, b, d, e, f, g, h, i, l, m, n, o, p, r, t, u, y]

Upper Case: [A, N, P]

Other: [ , ,]

these Colonies, solemnly publish and declare, That these United

Lower Case: [a, b, c, d, e, h, i, l, m, n, o, p, r, s, t, u, y]

Upper Case: [C, T, U]

Other: [ , ,]

Colonies are, and of Right ought to be Free and Independent

Lower Case: [a, b, d, e, f, g, h, i, l, n, o, p, r, s, t, u]

Upper Case: [C, F, I, R]

Other: [ , ,]

States; that they are Absolved from all Allegiance to the

Lower Case: [a, b, c, d, e, f, g, h, i, l, m, n, o, r, s, t, v, y]

Upper Case: [A, S]

Other: [ , ;]

British Crown, and that all political connection between them

Lower Case: [a, b, c, d, e, h, i, l, m, n, o, p, r, s, t, w]

Upper Case: [B, C]

Other: [ , ,]

and the State of Great Britain, is and ought to be totally

Lower Case: [a, b, d, e, f, g, h, i, l, n, o, r, s, t, u, y]

Upper Case: [B, G, S]

Other: [ , ,]

dissolved; and that as Free and Independent States, they have

Lower Case: [a, d, e, h, i, l, n, o, p, r, s, t, v, y]

Upper Case: [F, I, S]

Other: [ , ,, ;]

full Power to levy War, conclude Peace, contract Alliances,

Lower Case: [a, c, d, e, f, i, l, n, o, r, s, t, u, v, w, y]

Upper Case: [A, P, W]

Other: [ , ,]

establish Commerce, and to do all other Acts and Things which

Lower Case: [a, b, c, d, e, g, h, i, l, m, n, o, r, s, t, w]

Upper Case: [A, C, T]

Other: [ , ,]

Independent States may of right do. And for the support of this

Lower Case: [a, d, e, f, g, h, i, m, n, o, p, r, s, t, u, y]

Upper Case: [A, I, S]

Other: [ , .]

Declaration, with a firm reliance on the protection of divine

Lower Case: [a, c, d, e, f, h, i, l, m, n, o, p, r, t, v, w]

Upper Case: [D]

Other: [ , ,]

Providence, we mutually pledge to each other our Lives, our

Lower Case: [a, c, d, e, g, h, i, l, m, n, o, p, r, s, t, u, v, w, y]

Upper Case: [L, P]

Other: [ , ,]

Fortunes and our sacred Honor.

Lower Case: [a, c, d, e, n, o, r, s, t, u]

Upper Case: [F, H]

Other: [ , .]

Common Lower Case: [d, e, n, o, r, t]

Common Upper Case: []

Common Other: [ ]

Please Provide the code and the output screenshots

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 Databases Questions!