Question-1 Create Interface write all step that would be followed.
Answer:-
Question-2 Create a object for a class.
Answer:-
Answer:-
1 open the petcomposition project as the main project.
a select file > open project.
b browse t d:\labs\06-interfaces\practices.
c select petcomposition and select the "open as main project chek box.
d click the open project button.
2 expand the project diretories.
3 run the project. you should see output in the output window.
4 centralize all <name> functionality.
a create a nameable interface (under the com.example package).
b complete the nameable interface with setname and getname method signatures.
public interface nameable {
public void setname(string name);
public string getname();
}
c create a nameable class (under the com.example package).
Question-2 Create a object for a class.
Answer:-
No comments:
Post a Comment