UNIX ASSIGNMENTS: Day 1 Concept : Basic commands in UNIX, Filters, Pipes Objective : Participant will be able to: · Execute Basic Unix commands · Implement the concepts of Pipes and Filters · Work with vi editor Problems: Section 1: 1. List all the files and sub directories of the directory /bin. 2. List all the files including hidden files in your current directory. 3. List all the files starting with letter ‘r’ in your current directory. 4. List all the files having three characters in their names, from your current directory. 5. List all the files with extension ‘.doc’ in your current directory. 6. ...
1. What is the output? class point1 { static void a (int x, int y) { this.x=x; //non-static variable this cannot be referenced from a static context this.y=y; System.out.println(x+ “,”+y); } } class point { public static void main (String[] args) { point1 pp=new point1(); pp.a(4,3); } } a. 4 ,3 b. 3 ,4 c. Compile Error d. None of the above ------------------------------------------------------------------------------------------------------- 2. Local variables cannot be declared as final.(True / False) .... False ----------------------------------------------------------------------------------------------------- 3. What is the output? class A { A(int x, int y) { this.x=x; this.y=y; } A() { this(2,3); } public static void main(String[] args) { A a1 = new A(); System.out.println(“x=”+a1.x+”,y=”+a1.y); // cannot find symbol x and y } } a. x=2 y=3 b. x=-1...
Problem Statement Welcome to Day 12! Check out this video reviewing inheritance, or just jump right into the problem. You are given two classes, Student and Grade , where Student is the base class and Grade is the derived class. Completed code for Student and stub code for Grade are provided for you in the editor. Note that Grade inherits all the properties of Student . Complete the Grade class by writing a class constructor ( Grade(String,String,int,int) ) and a char calculate() method. The calculate method should return the character representative of a Student's *Grade. Score as defined in this chart: Input Format Input is already handled for you by the code pre-filled in the editor. There are 4 lines of input containing f i r s t n a m e , l a s t n a m e , p h o n e , and...
Comments
Post a Comment