Chinese Zodiac Calculator

This program takes the birth year from the user and displays the chinese zodiac on th terminal.


Details

What is the Chinese Zodiac ?

It is a type of astrology that has been used for 4000 thousand years. The Chinese zodiac is based on the twelve-year cycle of the lunar calendar. Each lunar year is assigned an animal and its recognized attributes. In Chinese astrology, animal zodiac signs assigned by year represent how others perceive you.

The Chinese zodiac is calculated by dividing the person's of birth year by 12. According to the remainder of the division:

  • If birth year%12 = 0 the Chinese Zodiac is Monkey
  • If birth year%12 = 1 the Chinese Zodiac is Rooster
  • If birth year%12 = 2 the Chinese Zodiac is Dog
  • If birth year%12 = 3 the Chinese Zodiac is Pig
  • If birth year%12 = 4 the Chinese Zodiac is Rat
  • If birth year%12 = 5 the Chinese Zodiac is Ox
  • If birth year%12 = 6 the Chinese Zodiac is Tiger
  • If birth year%12 = 7 the Chinese Zodiac is Rabbit
  • If birth year%12 = 8 the Chinese Zodiac is Dragon
  • If birth year%12 = 9 the Chinese Zodiac is Snake
  • If birth year%12 = 10 the Chinese Zodiac is Horse
  • If birth year%12 = 11 the Chinese Zodiac is Goat

Getting Started

Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.

Folder Structure

The workspace contains two folders by default, where:

  • src: the folder to maintain sources
  • lib: the folder to maintain dependencies

Meanwhile, the compiled output files will be generated in the bin folder by default.

If you want to customize the folder structure, open .vscode/settings.json and update the related settings there.

Dependency Management

The JAVA PROJECTS view allows you to manage your dependencies. More details can be found here.