This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static java.lang.System.*; | |
import java.util.Scanner; | |
class vehicle | |
{ | |
private int noOfWheel; | |
private int noOfPassenger; | |
private int model; | |
private String make; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3-1 | |
part 1 | |
//Banking.java | |
package com.day3.accountassignment; | |
import java.util.Scanner; | |
public class Banking { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/ person | |
public class Person | |
{ | |
String name; | |
int dateOfBirth; | |
public Person(String name,int dateOfBirth) | |
{ | |
this.name=name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Employee | |
{ | |
String name; | |
int salary; | |
} | |
public class Manager extends Employee | |
{ | |
String department_name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Application { | |
public static void main(String[] args) { | |
Student st=new Student(987654321); | |
st.display(); | |
Hosteller host=new Hosteller("Nirwana", 123, 321654987); | |
host.display(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package employee; | |
public class Employee { | |
private String EmpID; private String Name; private String Designation; private String ProjectID; | |
private String PhoneNumber; | |
public Employee(String empID, String name, String designation, | |
String projectID, String phoneNumber) { | |
super(); | |
EmpID = empID; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Question6Main { | |
public static void main(String[] args) { | |
ElectricalProduct ep=new ElectricalProduct(200, 30, 5, "abc", 123, 2100); | |
ep.display(); | |
} | |
// | |
public class ElectricalProduct extends Product { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package question7; | |
public class Book { | |
int bookId; | |
String title; | |
String author; | |
int price=250; | |
Book() { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Vehicle { | |
int vehicle_no; | |
String model; | |
String manufacturer; | |
String color="yellow"; | |
public Vehicle(){ | |
} | |
public Vehicle(int vehicle_no, String model, String manufacturer, String color) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Class Power | |
package com.day4.q1; | |
abstract public class power { | |
private double number; | |
power(){} | |
power(double number) | |
{ |
OlderNewer