Image description

ProGrad Lab | String Mania

A Quick Introduction

Emma is a quick learner. She's pretty enthu about becoming a developer. All her life, the only concept she has struggled to master is that of strings. Well, she calls them SSSSTTTTRRRRIIIINNNGGGGSSSS. That's how horrible she feels about them.

Anyway, while the feeling still persists, she has somehow managed to understand & master them. On that note, she decided to create a simple game which will help understand string operations better.

Could you help Emma with it?

What should you do

Fork this repo
Clone this repo
Practice Java basics - operators, conditions, loops, class and object

How To Submit

Upon completion, run the following commands:

git add .
git commit -m "ProGrad ID"
git push origin master

And finally, create a pull request so your ProGrad Mentor (PM) can review your work.

Instructions

  1. Do not modify the entire code.
  2. Edit the code as per the instructions.
  3. Go to Java Resources -> src folder.
  4. You will have 3 packages src/controller, src/utility.
  5. Once the progressions are completed, follow the instructions to run the application and test your code.

Testing

  1. Right click on your project and then run as - Junit.

Run the Project

  1. Right click on the project.
  2. Go to Run as -> Run on server.
  3. You can check the output in eclipse browser or in your browser.

Input Format

  1. There are three stages
  2. In stage - 1, there is one input which is a String.
  3. In stage - 2, there are two String inputs.
  4. In stage - 3, there are two String inputs.

Output Format

1 Based on the function selected, it can be a string, integer or boolean value.

Progression - 1

  1. Go to StringMethod class and create the following methods.
    • Write a method to convert the String to lowercase.
    • Write a method to convert the String to uppercase.
    • Write a method to find the first character in the string.
    • Write a method to return string length.
    • Write a method to trim the input string.
  2. All the methods should return the value as string.

Progression - 2

  1. Go to StringBoolean class and create the following methods.
    • Write a method to check if the string1 contains string2.
    • Write a method to to check if the string starts with the given letter.
    • Write a method to to check if the string end with the given letter.
    • Write a method to to check if two strings are equal.
    • Write a method to to check if two strings are equal by ignoring the case. for example prograd && PROgrAD should return true.
  2. All the methods should return the value as boolean.

Progression - 3

  1. Go to StringBoolean class and create the following methods.
    • Write a method to concatenate two strings.
    • Write a method to split the first string based on the second string value.
    • Write a method to find the index value of the given character in the first string.
  2. All the methods should return the value as String.

Happy Coding ProGrad ❤️