Fork this repo
Clone this repo
Practice Java basics - operators, conditions, loops, class and object
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.
- Do not modify the entire code.
- Edit the code as per the instructions.
- Go to Java Resources -> src folder.
- You will have 3 packages src/controller, src/service, src/model.
- You need to modify src/controller/AstroZoneController, src/service/AstroCalculator, src/model/User.
- Once the progressions are completed follow the instructions to run the application and test your code.
- Right - click on the project.
- Go to Run as -> Run on server.
- You can check the output in eclipse browser or in your browser.
- There are 4 arugments as input to this application.
- First input is a String which is the user name.
- Second input is a String which corresponds to email.
- Third input is a LocalDate which corresponds to the birthyear.
- Fourth input is a String which corresponds to the gender.
1 Output is a string which corresponds to your zodiac sign.
- Create a class called User inside the model package with the following arguments
- String name
- String email
- String dob
- String gender
- Generate appropriate getters and setters.
- Generate a 4-argument constructor in the User class.
- Create a class called AstroCalculator inside the service package.
- Create a public method findSign of type String.
- Your method takes User as input and returns a String as output.
- Calculate the sign based on your birth date.
- Return the output as a string.
- Create an object for User in AstroFormcontroller inside the controller package and pass the inputs as contructor arguments.
- Create an object for User class in the AstroFormController and pass the values given above as arguments to constructor.
- Create an object for the AstroCalculator class.
- Call the findSign method and store the return value in a String variable called as astrosign
- Print your details like name, email, dob and gender in the console as per the format given below.
- Print your current age based on dob.
- Print your astrology sign.
- Print the matching astrology sign
Your details
Name: FACEPrep.
Age: 4
Your Astrology: LEO.
Happy Coding ProGrad ❤️