โ Back to Encapsulation
Question 489
Constant Field
Constant Field
TheTimeConverterclass should define a public constantDaysInWeekequal to 7 and a methodWeeksToDays(int weeks)that returnsweeks * DaysInWeek. Do NOT write aMainmethod. ForWeeksToDays(3)the program prints: 21
Expected Output:
21
Topics:
Encapsulation
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.