Clunker Motors Inc. is recalling all vehicles in its Extravagant line from model years 1999-2002 as well all? Clunker Motors Inc. is recalling all vehicles in its Extravagant line from model years 1999-2002 as well all vehicles in its Guzzler line from model years 2004-2007. A boolean variable namedrecalled has been declared. Given a variablemodelYear and a String modelName write a statement that assigns true torecalled if...; Finally got the answer:

Respuesta :


Boolean variable answer =true 

Do{ 
Display "What is your model: 1. Extravagant 
2. Guzzler" 
Save answer into variable modelChoice 

display "What year is your model made in?" 
save answer into variable modelYear 

If (modelChoice == 1 && (modelYear>= 1999 && modelYear <=2002)) 

Display "your " modelYear "Extravagant has been recalled!" 
Set answer = false 

Else if (modelChoice == 2 && (modelYear>= 2004 && modelYear <=2007)) 

Display " your " modelYear " Guzzler has been recalled" 
set answer false 

Else 

Display " you chose an incorrect choice! Please try again" 
Set answer true
f((modelYear>=1999 && modelYear<=2002 && modelName=="Extravagant") || (modelYear>=2004 && modelYear<=2007 && modelName=="Guzzler")){   recalled=true;
hope it helps   recalled=false
Q&A Education