You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A ---
name: Practice problems unit 2 pathway 1 issue template
about: Issue template for Unit 1 | Pathway 1 | Practice Problems
title: 'Practice problems Unit 2 Pathway 1: Android Basics with Compose'
labels: ''
assignees: ''
in Solution Code of the exercice Foldable phones, is correct but not complete as if we add "newFoldablePhone.fold()
newFoldablePhone.checkPhoneScreenLight()" the result is wrong because the solution didn't take into account that we can try to fold the phone
**by not overidding the chechPhoneScreenLight() if we do "
newFoldablePhone.switchOn()
newFoldablePhone.checkPhoneScreenLight()
it will output:"The phone screen's light is off.
The phone screen's light is on.
The phone screen's light is on."
When it should output:
"The phone screen's light is off.
The phone screen's light is on.
The phone screen's light is off."
Steps to reproduce?
we should add "override fun checkPhoneScreenLight() {
val phoneScreenLight = if (isScreenLightOn && isPhoneFolded == false) "on" else "off"
println("The phone screen's light is $phoneScreenLight.")
}" or something like that to make the code work
Versions Android Studio version: API version of the emulator:
Additional information Include screenshots if they would be useful in clarifying the problem.
The text was updated successfully, but these errors were encountered:
A ---
name: Practice problems unit 2 pathway 1 issue template
about: Issue template for Unit 1 | Pathway 1 | Practice Problems
title: 'Practice problems Unit 2 Pathway 1: Android Basics with Compose'
labels: ''
assignees: ''
URL of codelab
in Solution Code of the exercice Foldable phones, is correct but not complete as if we add "newFoldablePhone.fold()
newFoldablePhone.checkPhoneScreenLight()" the result is wrong because the solution didn't take into account that we can try to fold the phone
**by not overidding the chechPhoneScreenLight() if we do "
newFoldablePhone.switchOn()
newFoldablePhone.checkPhoneScreenLight()
it will output:"The phone screen's light is off.
The phone screen's light is on.
The phone screen's light is on."
When it should output:
"The phone screen's light is off.
The phone screen's light is on.
The phone screen's light is off."
Steps to reproduce?
we should add "override fun checkPhoneScreenLight() {
val phoneScreenLight = if (isScreenLightOn && isPhoneFolded == false) "on" else "off"
println("The phone screen's light is $phoneScreenLight.")
}" or something like that to make the code work
Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.
The text was updated successfully, but these errors were encountered: