Question: Examine the flowchart image below and then find and correct all the syntax and/or logical errors. // This diagram describes a Sunglasses class and a
Examine the flowchart image below and then find and correct all the syntax and/or logical errors.
// This diagram describes a Sunglasses class and a Prescription Sunglasses class that inherits from it. The Sunglasses class contains a string style and a numeric darkness value that is required to be a number from 1 through 4. The subclass also includes two numbers for OS (left eye) value and OD (right eye) value. These typically are numbers such as +3.0 (which is moderately farsighted) or -1.5 (which is slightly nearsighted), Sunglasses -style string -darkness num +setStyle(styleName: +getStyle(): string +setDarkness (dkness +getDarkness(): void PrescriptionSunglasses -os : num -od num -style string -darkness num +setos (hours osNum) +get0s ( num +set0d (rate +getOd() num string) : num) : void void odNum): void
Step by Step Solution
3.30 Rating (159 Votes )
There are 3 Steps involved in it
1 CODE class Sunglasses private String style private int darkness public String getSty... View full answer
Get step-by-step solutions from verified subject matter experts
