Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Lab Description: Read in one line of text at a time. Each line will contain a psuedo social security number. Sum up the numbers that
Lab Description: Read in one line of text at a time. Each line will contain a psuedo social security number. Sum up the numbers that make up the social security number Sample Data # of data sets in the file-7 22-11-22-11-22 1-2-3-4-5-6 9C-100-90 1000-232 1-1-1-21-1-1-111-9999-1 9-9-9-9-9-9-9-9-9-9-9-9-9-9-9-9 Files Needed Social.java SocialRunner.java Sample Output SS# 22-11-22-11-22 has a sum of as algorithm hel SS# 1-2-3-4-5-6 has a sum of 21 SS# 90-100-90 has a sum of 280 SS# 10*0-232 has a sum of 1232 re! more n.imrers te: check ) SS# 1-1-1-21-1-1-111-9999-I has a sum of 1*133 SS# 9-9-9-9-9-9-9-9-9-9-9-9-9-9-9-9 has a sum of 144 SS# 1 has a sum of 1 import static java.lang.System.* public class Social private String socialNum; public Social) public Social(String soc) public void setSocial(String soc) public int getSum) return 0; public String toString() return ""; import java.io.IOException; import java.io.File; import java.util.Scanner; import static java.lang.System.* public class SocialRunner public static void main( String args throws IOException Scanner filenew Scanner (new File( "social.dat") 22-11-22-11-2:2 1-2-3-4-5-6 90-100-90 1000-232 1-1-1-21-1-1-111-9999-1 9-9-9-9-9-9-9-9-9-9-9-9-9-9-9-9
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started