HoursWorked Class

why am I getting an error with the object in the main

Current behavior:

Desired behavior

Repl link:

code snippet

Hi, I tried to access the repl but I get an error as in repl not found. Also if this is a school assignment, please state it in the title.

1 Like

Got access to your replit and there are some things that need to be adjusted.

For example, you have to define the class WorkLife before the main() function, so the compiler knows what WorkLife is when it sees WorkLife bo.

Other thing is that you are directly trying to access a private member of the class WorkLife. You declared HoursWorked as private and because of that it can’t be accessed directly.


Yes noticed this as well.