0% found this document useful (0 votes)
42 views4 pages

Assignment On Instance Variables and Methods: Submitted by

Uploaded by

md anik hasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views4 pages

Assignment On Instance Variables and Methods: Submitted by

Uploaded by

md anik hasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Assignment on

instance variables and methods


Submitted by:
Name: Md Anik Hosan
Id:201-35-572
Section: Ac-D
Subject: SE-211 Object oriented concept

Submitted to:
Name: S A M Matiur Rahman
Associate professor & associate head
Department of Software Engineering

Submitted on: 6rd April 2021

1
Answer to the question no:1

class Bicycle {
// Data Members
private String ownerName;
private String tagNo;
//Constructor: Initialzes the data member
public void Bicycle( ) {
ownerName = "Unknown";
tagNo = "Unassigned";
}
......
}
Answer to the question no:2

class Bicycle {
......
public void setTabNo(String number) {
tagNo = number;
}
......
}

Answer to the question no:3

class Bicycle {
......
Public String getTagNo( ) {
return tagNo;
}
......
}

You might also like