Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Customre;
- class User {
- protected String userid;
- protected String passwrd;
- public User(String userid, String passwrd) {
- this.userid=userid;
- this.passwrd=passwrd;
- }
- public void display() {
- System.out.println("User id = "+userid+"\n Passward = "+passwrd);
- }
- }
- public class Customre {
- Item i;
- private String name;
- private String email;
- public Customre(String name, String email) {
- this.name=name;
- this.email=email;
- }
- public static void main(String[] args) {
- Customre obj=new Customre("arafat Sunny","anisur15-2741@diu.edu.bd");
- User obj2= new User("Anisur","1234");
- Item obj3=new Item("One Plus 6",47500.9);
- }
- }
- class Item {
- Customre c;
- private String itemname;
- private double price;
- public Item(String itemname, double price) {
- this.itemname=itemname;
- this.price=price;
- }
- public void display() {
- System.out.println("Phone Item name = "+itemname+"\n Price = "+price);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement