Question: object orinted -java Q1: Using Scanner class, write a java program that reads a number from the used and then display its factorial. Q2: Spot

Q1: Using Scanner class, write a java program that reads a number from the used and then display its factorial. Q2: Spot the errors and correct them Scanner input = new Scanner(System.in); int x = input.next(); System.out.printf(x); PART 3 Q1: Answer next questions briefly: 1. Java is known as an extensible language. Why? 2. What is the different between local variables and instance variable? 3. What is an object? 4. In classes and objects, what do we need the constructor for? PART 4 Q1: Draw class diagram for Bank account, you can pick any number od attributes and methods. Q3: What is the output of this fragmented code: for (int i = 5; i != 0; i == 2) { System.out.println(i); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
