Question: 1 - Objective The purpose of this assignment is for students to practice File IO in Java. 2 - The Program You must detect all

 1 - Objective The purpose of this assignment is for studentsto practice File IO in Java. 2 - The Program You mustdetect all of the the email addresses in the input file calledinput.txt. If an email address does not have a sub-domain, create anEmail object to store the contents of that email. If an email

1 - Objective The purpose of this assignment is for students to practice File IO in Java. 2 - The Program You must detect all of the the email addresses in the input file called input.txt. If an email address does not have a sub-domain, create an Email object to store the contents of that email. If an email address does have a sub-domain, please create UniversityEmail object for that email. You must store all emails in the same (one single) array. 2.1 Email Class Define a base class called Email. The class Email will have 3 String member variables: username, domain,and extension. For example, if one of the email addresses in the file is wearelivinginasimulation21@ridiculousconspiracytheories.net, then the values of the member variables should be: Username: wearelivinginasimulation21 Domain: ridiculousconspiracytheories - -Extension: net The Email class should contain a function that returns the code value of 0 and will be overwritten in the extended class to return the various associated codes for each UniversityEmail. This will enable you to print your output by code selection. Refer to section 22 for information about the code value. 2.2 UniversityEmail Extended Class Derive a class called UniversityEmail that extends Email. UniversityEmail will have 2 additional member variables: department (string) and code (int). Refer to the table below to assign a value to the member variable code. 1 - Objective The purpose of this assignment is for students to practice File IO in Java. 2 - The Program You must detect all of the the email addresses in the input file called input.txt. If an email address does not have a sub-domain, create an Email object to store the contents of that email. If an email address does have a sub-domain, please create UniversityEmail object for that email. You must store all emails in the same (one single) array. 2.1 Email Class Define a base class called Email. The class Email will have 3 String member variables: username, domain,and extension. For example, if one of the email addresses in the file is wearelivinginasimulation21@ridiculousconspiracytheories.net, then the values of the member variables should be: Username: wearelivinginasimulation21 Domain: ridiculousconspiracytheories - -Extension: net The Email class should contain a function that returns the code value of 0 and will be overwritten in the extended class to return the various associated codes for each UniversityEmail. This will enable you to print your output by code selection. Refer to section 22 for information about the code value. 2.2 UniversityEmail Extended Class Derive a class called UniversityEmail that extends Email. UniversityEmail will have 2 additional member variables: department (string) and code (int). Refer to the table below to assign a value to the member variable code

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!