Advertisement
Swampert420

Subject

Aug 14th, 2022 (edited)
720
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | Source Code | 0 0
  1. package pack2;
  2.  
  3. public class Subject {
  4.    
  5.     static String[] subject = {"Maths", "C++", "Java", "Python"};
  6.     public static String getSubject(int index){
  7.         return subject[index-1];
  8.     }
  9. }
  10.  
  11. /* package1 -> Vehicle (speed, gear, seats, tires)
  12.    packag2  -> Driver (name)
  13.    package3 -> TwoWheeler (speed, gear, seats, tires)
  14.    package4 -> FourWheeler (speed, gear, seats, tires)
  15.    package5 -> Bullet (speed, gear, seats, tires, driverId)
  16.    package6 -> Wagonr (speed, gear, seats, tires, driverId)
  17.    package7 -> MainClass
  18.  
  19.    WAP to show all the details of a bike bullet and car wagonr with driverName
  20. */
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement