nitesh-30
Ready to learn new tools and technology // Full stack developer // Coder // Graphic Designer // Data Analyst // Web scrapper
Pinned Repositories
Analysing-data
Binarytree
calculate-volume-of-water-tank
Statement:Anil very well knows the power of object orientation so he wants to create a small program that can calculate the volume of a water tank. He knows, he can calculate the volume of any shape if the length L, width W and height H of that shape is known. But he also knows rather focusing on length, width and height if any one provides a water tank to his program still, he can calculate the volume using object-oriented way. In order to achieve his goal, he needs your help to create such program which should be smart enough to calculate the volume in following conditions. If any one gives only one number x to calculate the volume your program should treat L=B=H=x And calculate the volume. If any one gives only two numbers x and y to calculate the volume your program should treat L=B=x and H=y If any one gives three numbers x,y and z then treat 3 numbers as x=L, y=B and z=H respectively. Now interesting thing is if any one gives a WaterTank your program should able to find given water tank’s L B and H and calculate volume of it. to implement the above operations create a class Calculate and create function volume(<arguments>) inside that class, to calculate volume for all above cases and finally print the calculated volume in the volume(<arguments>)function only. in order to create the watertank object first design a class WaterTank which contains 3 private data members L B and H of type integer. class WaterTank contains following methods. first it contains a constructor, the constructor work is to accept three integers as argument and initialize instance variable L, B and H with these arguments. class WaterTank contains 3 more methods getLength(), getWidth() and getHeight() work of these functions is to return value of L, B and H respectively. for better understating we are providing you a code snippet, this code snippet contains a main() method and some statements. We have already written this code snippet in this program so there is no need to write main() method for this program. So your task is to just observer the code snippet and write the rest code (class creation) which is required for successful execution of the program. int main() { int x,y,z; //declaring three variables x,y and z denoting length, width and height respectively. int l,b,h;//declaring three variables l,b and h denoting length, width and height of WaterTank object respectively. cin>>x>>y>>z; //taking input in x, y and z denoting length, width and height of tank respectively. cin>>l>>b>>h;//taking input in l, b and h denoting length, width and height of WaterTank Object respectively. WaterTank w(l,b,h);//creating object w of WaterTank Calculate c;//creating object c of Calculate class c.volume(x);//should print the volume by assuming length=width=height=x c.volume(x,y); //should print the volume by assuming length=width=x and height=y c.volume(x,y,z);//should print the volume by assuming length=x, width=y and height=z c.volume(w);//should print the volume of watertank w. return 0; } Input:first line contains three integers x, y and z denoting length, width and height respectively. second line contains three integers l, b and h denoting length, width and height of watertank object respectively. Output:output contains four lines. first line contains an integer denoting volume by assuming length=width=height=x second line contains an integer denoting volume by assuming length=width=x and height=y third line contains an integer denoting volume by assuming length=x, width=y and height=z fourth line contains an integer denoting volume of watertank w. Constraint :1<=all variables<=50 don’t write main() method in your program, just complete the coding of class. include header files and use namespaces as per your requirement.
car_price_predictor
college
All my college projects and codes
data-scraping-iphone
datasciencecoursera
DataSetsort-in-c-
Statement: write a c++ program such that it can sort the array in increasing and decreasing order using the operator. 1 ^“+” to sort array in increasing order 2 ^“-” to sort array in descending order. For this create a class named as DataSet which contains two private data members. First is integer pointer p to point dynamically created array and second one is integer variable n to store the size of dynamically created array. Class DataSet contains following methods First it contains a constructor which accepts an integer n as argument denoting size of dynamically created array. The constructor should create the array of size n dynamically, and also initialize that array with n integer values. Second it contains a print() method whose work is to print the elements of DataSet separated by space. suppose D1 is the DataSet so statement D1^"+" should sort the D1 in increasing order and statement D1^"-" should sort the D1 in decreasing order. for better understating we are providing you a code snippet, this code snippet contains a main() method and some statements. We have already written this code snippet in this program so there is no need to write main() method for this program. So your task is to just observer the code snippet and write the rest code (class creation) which is required for successful execution of the program. int main() { int n; //declare a variable n denoting size of dynamic array cin>>n;//taking input in integer n denoting size of dynamic array DataSet D1(n); //creating object of DataSet D1 D1.print(); //print the elements of DataSet D1 separated by space D1^“+”; //sort the elements of DataSet D1 in increasing order D1.print();//should print the elements of DataSet D1 in increasing order separated by space D1^“-”; //sort the elements of DataSet D1 in decreasing order D1.print();//should print the elements of DataSet D1 in decreasing order separated by space return 0; } Input : first line contains an integer n denoting size of dynamically created array. Second line contains n space separated integers denoting elements of array. Output: output contains three lines. First line contains n space separated integers denoting elements of DataSet D1 Second line contains n space separated integers denoting elements of DataSet D1 in increasing order Third line contains n space separated integers denoting elements of DataSet D1 in decreasing order. Constraints:5<=n<=10don't write the main() function for this program Example: 5 5 2 1 3 4 5 2 1 3 4 1 2 3 4 5 5 4 3 2 1
dhch
Resumenitesh.github.io
nitesh-30's Repositories
nitesh-30/Resumenitesh.github.io
nitesh-30/Analysing-data
nitesh-30/Binarytree
nitesh-30/car_price_predictor
nitesh-30/college
All my college projects and codes
nitesh-30/data-scraping-iphone
nitesh-30/datasciencecoursera
nitesh-30/dhch
nitesh-30/DSA
nitesh-30/eyeblinker
nitesh-30/flipkart-bookdetail
nitesh-30/Generateorgevent-data
IT will Generate the data like Nmae ,Dob, phone , LAT,LONG etc
nitesh-30/GYM-Tasticks
nitesh-30/hactoberfest-2022
nitesh-30/intersaladata-Selinium-
nitesh-30/IPL-WIN-PREDICTION-data-analysis
nitesh-30/ipldetail2022
nitesh-30/landdetail-data-scrapping
nitesh-30/landdetail-scrapping-
nitesh-30/large_int_factorial
this code is about finding the the factorial of large number
nitesh-30/Location_Tracker
In this model i have used markov ,folium module ,numpy ,plotly,etc to predict the future loaction of a person based on his previous location history
nitesh-30/Login-syatem-by-rdbms
nitesh-30/loginsystem
nitesh-30/Movie-Details
nitesh-30/movie-recomded-System
nitesh-30/NER_using_Spacy
NER(Name Entity Recoganitation) using spacy
nitesh-30/nitesh-30
Config files for my GitHub profile.
nitesh-30/OlympicData-Analysis
nitesh-30/student_edu_webapp
nitesh-30/Whats-up-ChatAnalysis