Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Infrastructure For Medical Research In Databases

Authors: Thomas Heinis ,Anastasia Ailamaki

1st Edition

1680833480, 978-1680833485

More Books

Students also viewed these Databases questions

Question

What are the advantages of real-time processing?

Answered: 1 week ago

Question

=+ 2. How well known are his/her credentials to the audience?

Answered: 1 week ago

Question

positive language conveys more than negative language True False

Answered: 1 week ago