Write a small program to write the text \"we are one JSU\" to a file named jsu.t
ID: 3828332 • 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 integer, one character, one boolean) and the methods(find(), isthere()? what is function overloading? True or false 1) 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.......() 2) 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) Program(C++)
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
string input="We are one JSU";
ofstream out("jsu.txt");
out << input;
out.close();
return 0;
}
Output:-
jsu.txt(file)
We are one JSU
5)Program
class Sample
{
private: int a,char b,boolean c;
public: int find()
{}
public: void istheir()
{}
}
int main()
{
Sample s;
s.find();
s.istheir();
}
6)Function Overloading :-
The same function present multiple times in the same class with different signatures is called function overloading.The signature refers the number of arguments in the function or the return type of the function arguments.
ex:-
class OverloadingExe
{
int function(int a,int b){}
int function(int a){}//overloaded function
double function(double a){} //overloaded function
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.