Question: 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
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.
public class Students public static void main (String args) String s1"Java Programming" String s2"at seu" String s3- "Type your ne "; System.out.print (S1) System.out.print("" System.out.println (s2.toupperCase)) System.out.println (s3) System.out.println( "This is my first Assignment" System.out.print (s1.replace ("java""cs140")) System.out.print("" System.out.println (s2.toLowerCase)) System.out.print (8 8) System.out.print (" = "); System.out.println (s1.length(5)) Output -Students (run) run: Java Programming AT SEU My name is Mohammed F. Ali! n This is my first Assignment CS140 Programming at seu 8+8e 16 Error number Error Type 1 System.out.print(S1), Compile-time error 4 Class1: public class Car( private string modeli privateat year; publig Car ) model= "" year, = 0; publis Car (String model, int year) this.mode = model; this, year = year; public tring shangeModel (String model) this . mode model; = string getModel return model: public J. public void changeYear (int year) t this.ye a r = year; publicintgetYear) yeas Class2: publig class CarTester publis static void main (String[] args) Car car1 = new Car ("Toyota", 2017); System.outaprintln(car1.getModel )) System.outaprintln(car1.getYear)) Car car2 = car 1 ; car2.Model ("Nissan" car2.changeYear (1999); System.outaprintln(car2.getModel )) System.out println(car2.Year ))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
