NicholasRamos5 / VSCodings

Apache License 2.0
0 stars 0 forks source link

2019 FRQ #1 #11

Open NicholasRamos5 opened 1 year ago

NicholasRamos5 commented 1 year ago

Personal Score: 2.7/3, Teacher Score: 2.8/3

Requirements:

Postman Outputs

isLeapYear : returns a true or false value as to wether or not a year is considered a leap year

Screen Shot 2022-11-18 at 6 00 45 AM

firstDayOfYear : returns the value of the day of the week (starting with 0 = Sunday) a year begins with

Screen Shot 2022-11-18 at 6 02 03 AM

dayOfYear : returns the numbered day of the year when given a certain day, month, and year. For example, February 1st is the 32nd day of any year.

Screen Shot 2022-11-18 at 6 02 55 AM

numberOfLeapYears : When given two years, returns the number of leap years between and including those years

Screen Shot 2022-11-18 at 6 03 37 AM

dayOfWeek : Returns the value of the day of the week when given a specific day, month, year.

Screen Shot 2022-11-18 at 6 04 04 AM

Test and use VSCode Debugger in development

Screen Shot 2022-11-18 at 8 51 43 AM Screen Shot 2022-11-18 at 8 53 24 AM

Further Issues I encountered

I accidentally kept the method for setting the First Day of Year as private. With this, I was not able to access this method outside of it’s own class, and the postman output was not functioning correctly.

Screen Shot 2022-11-18 at 6 12 45 AM

I failed to include a default return statement in my switch case loop for the First Day Of the Year. The execution got at a spot where the method ends but there is no "return" statement.

Screen Shot 2022-11-18 at 6 16 35 AM

This was a stupid mistake, but I actually didn’t use this method in the project as of this point. Obviously, this was going to cause a local error.

Screen Shot 2022-11-18 at 6 17 53 AM
NicholasRamos5 commented 1 year ago

FRQ 1

jm1021 commented 1 year ago

2.8