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, 21.06.2019 19:40
Consider the following generator matrix: g= (1 0 0 0 1 0 0 0 1 1 1 1 1 0 1 1 1 0) find all the codewords generated by this generator matrix. determine the number of errors that this code will detect. determine the number of errors that this code will correct. prove that a linear code's minimum weight is equivalent to its minimum distance. that is, where c is a linear code, dist(c) = wh(c)
Answers: 1
question
Computers and Technology, 21.06.2019 22:00
Signal sets company contracts to deliver one hundred 52-inch plasma high-definition television sets to a new retail customer, tuner tv store, on may 1, with payment to be made on delivery. signal tenders delivery in its own truck. tuner's manager notices that some of the cartons have scrape marks. tuner's owner phones signal's office and asks whether the sets might have been damaged as they were being loaded. signal assures tuner that the sets are in perfect condition. tuner tenders signal a check, which signal refuses, claiming that the first delivery to new customers is always for cash. tuner promises to pay the cash within two days. signal leaves the sets with tuner, which stores them in its warehouse pending its "grand opening sale" on may 15. two days later, tuner's stocker opens some of the cartons and discovers that a number of the sets are damaged beyond ordinary repair. signal claims tuner has accepted the sets and is in breach by not paying on delivery. will signal succeed on these claims? explain.
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 15:00
What is the total resistance in a circuit that contains three 60 ohm resistors connected in a series? a. 20 ohms b. 120 ohms c. 60 ohms d. 180 ohms
Answers: 2
You know the right answer?
The following class contains several errors that violate the rules of java: 1. class thermometer {...
Questions
question
Mathematics, 21.11.2020 06:00
question
Physics, 21.11.2020 06:00
question
Mathematics, 21.11.2020 06:00
question
Arts, 21.11.2020 06:00
question
Social Studies, 21.11.2020 06:00
question
Mathematics, 21.11.2020 06:00
Questions on the website: 13722359