x Questions will be given on the day of the test.
Pick question according to your roll number: for e.g if x=4 and last three digit of your roll no are 123 then your question no is (1+2+3)%4 + 1 = 3
Name: Shakti Tripathi Roll No:R103217097 SAPID: 500060130 Batch:B3 Question Assigned: 3,4
-
Use proper coding ethics.
-
Use Package.
-
Use Access Modifiers Properly.
-
Different file for each class.
-
Folder hierachy: src/com/bao/<your_roll_no>/<your_class.java> bin/com/bao/<your_roll_no>/<your_class.class>
-
To do all above Code in Eclipse and commit in your own repository you pulled earlier.
-
Raise a merge request(thru github webpage) to me and add screenshot of output withit.
-
Request should be raised within Lab timing. i.e
# B4 BAO - 15 April 2019 11:30-13:30Hrs # B3 BAO - 16 April 2019 09:30-11:30Hrs # B3 OGI - 17 April 2019 09:30-11:30Hrs MAX Allowable time with marks deduction is 1 Hour.
All the Best!!
public class testq1{ public boolean inOrderEqual(int a, int b, int c, boolean equalOk) { if (!equalOk && a < b && b < c) return true; if (equalOk && a <= b && b <= c) return true; else return false; } public static void main(String[] args){ boolean z; testq1 a=new testq1(); z=a.inOrderEqual(5,8,7,true); System.out.println(z); } }
package labtest2;
public class testq2 { public boolean makebricks(int small,int big,int goal) { int maxBig = goal/5; if(maxBig <= big) goal = maxBig5; else goal = big5; if (goal <= small) return true; else return false;
}
public static void main(String args[])
{
boolean x;
testq2 b=new testq2();
x=b.makebricks(1, 5, 3);
System.out.println(x);
}
}