Write a java classStringCheckto do the below given checks on accepted string or strings. Each function should be coded in separate methods of the class. Give appropriate instance variables to implement the method. The user should be able to enter the string through the main function in Main class. Use a constructor to initialize the String entered by the user. Use the Main class to test all the methods in StringCheckclass. The programs should have the below given checklist: 1)Define classStringCheck with required instance variables 2)The StringCheck class should have six methods to do the below functions: *Check if the user entered string is a simple sentence? (Starts with capital letter, Ends with period, space between words). *Check if the user entered string is a question? (Check if the string starts with a c apital letter ends with a question mark, space between words) *Check if the user entered string have numbers in it? *Check if string is a valid email *Check if the user entered strings (two separate strings) are same? A method to check if the user entered character is present in the user entered string. Add a second constructor to initialize string and character when object is created.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
The educational content outlines the following problem statement and tasks related to Java programming:

### Problem Statement:
Develop a Java class, `StringCheck`, to perform a series of checks on accepted strings. Each function should be implemented as separate methods within the class. Users will input strings via the main function in a `Main` class, which initializes these strings through a constructor. The `Main` class will also test all methods in the `StringCheck` class.

### Program Requirements:
1. **Define Class:**
   - Create the `StringCheck` class with necessary instance variables.

2. **Methods in StringCheck Class:**
   - Implement six methods for the following checks:
     - **Simple Sentence:** Verify if the string starts with a capital letter, ends with a period, and contains spaces between words.
     - **Question:** Check if the string starts with a capital letter, ends with a question mark, and contains spaces between words.
     - **Contains Numbers:** Determine if the string includes numbers.
     - **Email Validation:** Check if the string is a valid email address.
     - **String Equality:** Compare two different strings to see if they are identical.
     - **Character Presence:** Confirm if a specific character is present in the string. Include a second constructor to initialize both string and character when an object is created.

3. **Documentation:**
   - Comment all parameters using `@param` and return values using `@return` before each method to explain the inputs and outputs.

4. **Main Class Development:**
   - Write a `Main` class that accepts one or more strings from the user and tests them using the `StringCheck` class methods.

5. **Testing:**
   - Provide each test string used, along with the test results and output of the program.

This content should help students understand Java class design, method implementation, and effective commenting practices in programming.
Transcribed Image Text:The educational content outlines the following problem statement and tasks related to Java programming: ### Problem Statement: Develop a Java class, `StringCheck`, to perform a series of checks on accepted strings. Each function should be implemented as separate methods within the class. Users will input strings via the main function in a `Main` class, which initializes these strings through a constructor. The `Main` class will also test all methods in the `StringCheck` class. ### Program Requirements: 1. **Define Class:** - Create the `StringCheck` class with necessary instance variables. 2. **Methods in StringCheck Class:** - Implement six methods for the following checks: - **Simple Sentence:** Verify if the string starts with a capital letter, ends with a period, and contains spaces between words. - **Question:** Check if the string starts with a capital letter, ends with a question mark, and contains spaces between words. - **Contains Numbers:** Determine if the string includes numbers. - **Email Validation:** Check if the string is a valid email address. - **String Equality:** Compare two different strings to see if they are identical. - **Character Presence:** Confirm if a specific character is present in the string. Include a second constructor to initialize both string and character when an object is created. 3. **Documentation:** - Comment all parameters using `@param` and return values using `@return` before each method to explain the inputs and outputs. 4. **Main Class Development:** - Write a `Main` class that accepts one or more strings from the user and tests them using the `StringCheck` class methods. 5. **Testing:** - Provide each test string used, along with the test results and output of the program. This content should help students understand Java class design, method implementation, and effective commenting practices in programming.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY