subject

The following class contains several errors that violate the rules of java: 1. class thermometer { 2. private int temperature 3. public thermometer(int degrees) { 4. temperature = degrees; 5. } 6. public thermometer() { 7. temperature = 0.0; 8. } 9. public void makewarmer(int degrees) { 10. temperature =+ degrees; 11. } 12. public void makecooler(int degrees) { 13. temperature -= degrees; 14. } 15. public gettemperature() { 16. return temperature; 17. } 18. public string tostring() { 19. return temperature + ' degrees'; 20. } 21. } describe each error and specify whether it is (a) lexical, (b) syntactic, use the numbers shown to identify the line on which each error occurs. the class may also contain programming errors tected by a java compiler. you should ignore these errors (c) semantic. or that do not violate the rules of java and will not be detected by a java compiler. you should ignore these errors.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:20
Terri needs to insert a cover page into her document. where should she go to access the commands to do so? o insert tab, objects group o insert tab, illustrations group o insert tab, pages group o insert tab, media group submit
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
In the context of an internet connection, llc stands for leased line connection liability limited company local loop complex local loop carrier
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
How to launch an app: steps to be successful? launching an app is a great idea, but it’s not that easy as we supposed to think. the majority of mobile applications don’t generate revenue because companies aren’t ready to be competitive. referring to our experience in successfully building and launching apps we hope to you omit these difficulties. we are going to talk about ideas, marketing, testing your product, its development, distribution and support. you will learn 8 product launch stages to succeed.
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
3. when you right-click a linked spreadsheet object, what commands do you choose to activate the excel features? a. linked worksheet object > edit b. edit data > edit data c. linked spreadsheet > edit d. object > edit data
Answers: 2
You know the right answer?
The following class contains several errors that violate the rules of java: 1. class thermometer {...
Questions
question
Biology, 19.03.2020 07:06