If you show us you are trying it, you will get help (as I helped
this user[
^]). Being newbie is not a crime. Just posting the requirements of your homework is not a valid question, and makes us think you are just lazy, so you won't get the answers you are looking for.
Try it on your own, start coding. When you get a problem then come back, use "improve question" to add the code you did and a explanation of your problem, then we will be glad to help you understand you error and give you the needed information to solve your problem.
If you don't want to try it... then please read
this[
^]