- Engineering
- Computer Science
- please i need unique answer use your own words dont...
Question: please i need unique answer use your own words dont...
Question details
Please, i need Unique answer, Use your own words (don't copy and paste).
*Please, don't use handwriting.
Given the code above:
- Find the errors (either compile or run-time error) so that you have the same output listed below then state the type of the error.
- After you fixed the errors, rewrite the Java code using your name.(Mohammed)
- Show a screenshot of the output (if there is no screenshot of the output, the student shall get a zero mark for this question).
_______________________________________
Q2
Consider the following java application consisting of two classes, and then answer the questions below.
- Find and fix the errors in the previous application.
- What is the output of the previous application? (What will be printed on the console window when CarTester class is executed)?
- What are the values of (model) and (year) variables for the object variable car1 and why?
_______________
Q3
Write a program that asks the user to enter two integers and then print:
• The sum
• The difference
• The product
• The average
• The maximum (the larger of the two)
• The minimum (the smaller of the two)
Hint: The max and min functions are declared in the Math class.
_________________________
Q4
- Create a class "Mobile" with the following specifications: brand, color, screen size and camera size as field.
- Declare the instance variableswith suitable data types.
- Define a constructor that allow the initialization of all the data of a mobileby specific values.
- Define all the needed getter methods: getBrand(), getColor(), getScreen() and getCamera().
- Write a tester class. In the main, create twophones then, display the details of each one.
Solution by an expert tutor
