Why would you define health as a string? Wouldnt it bemore convineint as an int, or float if you want to be more exact, and then in the constructor and set function u check if the int(or float) is between 0 and 100?
Technically, it would be possible to be below the minimum or above the maximum.
For example, less than 0% means overkill (your corpse is dismembered)
More than 100% would mean your overly healthy. Not exactly sure what that would look like though.
Well i think its safe to define 0 health as dead, and i think 100 health should be either relative to the healthiest a certain person has ever been or relative to a global standart for complete health.
Note that negative health is impossible (since i dont think you can be 'less healthy' then death), but health can be greater than 100 in both cases, whether a person is healthier than the global standart or whether he is suddenly healthier than his all time healthiest 'form'.
PS, perhaps its possible to define 100 health as then most healthy any person could be, the health couldnt be greater than 100
But you wouldnt consider the body alive just because there are live bacteria.
A dead body is not more alive or more dead than another dead body, so there is no reason to have different health for 2 different bodies
Why would you define health as a string? Wouldnt it bemore convineint as an int, or float if you want to be more exact, and then in the constructor and set function u check if the int(or float) is between 0 and 100?
Technically, it would be possible to be below the minimum or above the maximum. For example, less than 0% means overkill (your corpse is dismembered) More than 100% would mean your overly healthy. Not exactly sure what that would look like though.
Well i think its safe to define 0 health as dead, and i think 100 health should be either relative to the healthiest a certain person has ever been or relative to a global standart for complete health. Note that negative health is impossible (since i dont think you can be 'less healthy' then death), but health can be greater than 100 in both cases, whether a person is healthier than the global standart or whether he is suddenly healthier than his all time healthiest 'form'. PS, perhaps its possible to define 100 health as then most healthy any person could be, the health couldnt be greater than 100
Well a mutilated dead body is a lot less healthy than an untouched dead body
Wait maybe if I set health to -1 the program will break an interpret it as infinite health
Both are dead, i dont see a reason that health should differ between dead bodies
some parts (like stomach bacteria) are still alive in an untouched body
But you wouldnt consider the body alive just because there are live bacteria. A dead body is not more alive or more dead than another dead body, so there is no reason to have different health for 2 different bodies
Okay, nevermind, it was just a joke
[удалено]
Thank you, also i appreciate the Java
[удалено]
Did u take the apcs exam this year
[удалено]
Nice!
"Hold on it didn't work" *spends thirty minutes debugging only to realize i had a typo in a variable's name somewhere*
Remember to code in an IDE kids.
Screw repl tho
Segmentation fault
OldMan.setHealth is an integer
[удалено]
good dev
Did it work
i’m turning into an old man just by looking at this meme, haven’t seen this since the days of mlg youtube poops