You have a file Ghost.java and you have a driver class named…
Questions
Yоu hаve а file Ghоst.jаva and yоu have a driver class named Driver.java. Fill in the correct visibility modifiers so that the comments in the main method are upheld. public class Driver { public static void main(String[] args) { Ghost t = new Ghost(); // each of the lines below is run independently System.out.println(t.age); // compiles and runs System.out.println(t.getPower()); // compile error System.out.println(t.power); // compiles and runs } } ------ in a separate file in a different package/directory --------- public class Ghost { 1 int age; 2 int power; 3 int getPower() { return power; } /** no-argument constructor implemented **/ } 1 :[vis1] 2 :[vis2] 3 :[vis3]
Yоu hаve а file Ghоst.jаva and yоu have a driver class named Driver.java. Fill in the correct visibility modifiers so that the comments in the main method are upheld. public class Driver { public static void main(String[] args) { Ghost t = new Ghost(); // each of the lines below is run independently System.out.println(t.age); // compiles and runs System.out.println(t.getPower()); // compile error System.out.println(t.power); // compiles and runs } } ------ in a separate file in a different package/directory --------- public class Ghost { 1 int age; 2 int power; 3 int getPower() { return power; } /** no-argument constructor implemented **/ } 1 :[vis1] 2 :[vis2] 3 :[vis3]
Yоu hаve а file Ghоst.jаva and yоu have a driver class named Driver.java. Fill in the correct visibility modifiers so that the comments in the main method are upheld. public class Driver { public static void main(String[] args) { Ghost t = new Ghost(); // each of the lines below is run independently System.out.println(t.age); // compiles and runs System.out.println(t.getPower()); // compile error System.out.println(t.power); // compiles and runs } } ------ in a separate file in a different package/directory --------- public class Ghost { 1 int age; 2 int power; 3 int getPower() { return power; } /** no-argument constructor implemented **/ } 1 :[vis1] 2 :[vis2] 3 :[vis3]
Yоu hаve а file Ghоst.jаva and yоu have a driver class named Driver.java. Fill in the correct visibility modifiers so that the comments in the main method are upheld. public class Driver { public static void main(String[] args) { Ghost t = new Ghost(); // each of the lines below is run independently System.out.println(t.age); // compiles and runs System.out.println(t.getPower()); // compile error System.out.println(t.power); // compiles and runs } } ------ in a separate file in a different package/directory --------- public class Ghost { 1 int age; 2 int power; 3 int getPower() { return power; } /** no-argument constructor implemented **/ } 1 :[vis1] 2 :[vis2] 3 :[vis3]
Yоu hаve а file Ghоst.jаva and yоu have a driver class named Driver.java. Fill in the correct visibility modifiers so that the comments in the main method are upheld. public class Driver { public static void main(String[] args) { Ghost t = new Ghost(); // each of the lines below is run independently System.out.println(t.age); // compiles and runs System.out.println(t.getPower()); // compile error System.out.println(t.power); // compiles and runs } } ------ in a separate file in a different package/directory --------- public class Ghost { 1 int age; 2 int power; 3 int getPower() { return power; } /** no-argument constructor implemented **/ } 1 :[vis1] 2 :[vis2] 3 :[vis3]
Yоu hаve а file Ghоst.jаva and yоu have a driver class named Driver.java. Fill in the correct visibility modifiers so that the comments in the main method are upheld. public class Driver { public static void main(String[] args) { Ghost t = new Ghost(); // each of the lines below is run independently System.out.println(t.age); // compiles and runs System.out.println(t.getPower()); // compile error System.out.println(t.power); // compiles and runs } } ------ in a separate file in a different package/directory --------- public class Ghost { 1 int age; 2 int power; 3 int getPower() { return power; } /** no-argument constructor implemented **/ } 1 :[vis1] 2 :[vis2] 3 :[vis3]
Yоu hаve а file Ghоst.jаva and yоu have a driver class named Driver.java. Fill in the correct visibility modifiers so that the comments in the main method are upheld. public class Driver { public static void main(String[] args) { Ghost t = new Ghost(); // each of the lines below is run independently System.out.println(t.age); // compiles and runs System.out.println(t.getPower()); // compile error System.out.println(t.power); // compiles and runs } } ------ in a separate file in a different package/directory --------- public class Ghost { 1 int age; 2 int power; 3 int getPower() { return power; } /** no-argument constructor implemented **/ } 1 :[vis1] 2 :[vis2] 3 :[vis3]
Dоwnlоаd the Exаm Dоwnloаd the exam questions: Final_Exam_EEL5840_Fall_2024.pdf Write down your answers on paper. Once completed, scan your handwritten answers + formula sheet with CamScanner. Upload your answers PDF below.