Write a small program to write the text\" we are one JSU\" to a file named jsu.t
ID: 3827465 • Letter: W
Question
Write a small program to write the text" we are one JSU" to a file named jsu.txt? Write a specification file of a class name Sample, with Private data members(one intezer, one character, one boolean) and the methods(find(), isthere())? What is funtion overloading? True or false When an object-oriented design proceeds to the implementation stage, it is possible that some operations listed in the object table will be implemented as built-in operations......() Structured design (functional decomposition) begins by identifying the major actions to be performed, whereas object-oriented design begins by identifying the major objects and operations......()Explanation / Answer
4.
import java.io.*;
import java.util.*;
try {
BufferedWriter out = new BufferedWriter(new FileWriter("JSU.txt"));
out.write("we are oneJSU");
out.close();
}
catch (IOException e)
{
System.out.println("Exception ");
}
5.
import java.util.*;
Class A{
Private:
int a = 1;
char c= 'y';
boolean bool = true;
void find()
{
System.out.println("private integer is "+a);
}
void isthere()
{
System.out.println(bool);
}
}
Class sample{
Public static void main(string []args)
{
A a = new A();
a.find();
a.Isthere();
}
}
6.Function overloading
Two or more Function which have same function name but different type of arguments is know as function overloading
Eg:
Void add(a,b,c);
Void add(a,b);
Void add(a);
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.