Declare clockSpeedRatingField as a private member. To output it there are few things you need to do. First you need to also declare clockSpeedField as a private member and make the only way to change it by a method. You define your own method that accepts 1 argument which is the new value of clockSpeedField. Here you set the clockSpeedFieldRating and you perform the necessary checks. If it is below 1.5 you output it to the user.
No comments:
Post a Comment