Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

how to calculate total income a an employee


 Discuss constructors with default arguments and constructor overloading with the help of suitable 

examples.


Q2: Write a program to overload operators in the same program by writing suitable operator member




functions for following expression:




O7= ((O1 % O2)>(O3 || O4) - (O5>O6)) [Here O1,O2,O3,O4,O5,O6 and O7 are objects of a class




“overloading”, and this class is having one integer data member]

Write a program to take input for n number of doctor records and write records of all cardiologists in a file named: “record1”. Also write records of all those doctors in another file named: “record2” who are taking salary more than INR 80,000. After writing records in both files, merge their contents in another file: “finalrecord” and read all records of “finalrecord” file and display on screen. [Attributes of doctor: doc_id, doc_name, doc_specialization, doc_salary Note: (solve without vectors)


Discuss constructors with default arguments and constructor overloading with the help of suitable examples.

Write a program to overload operators in the same program by writing suitable operator member functions for following expression:



07= ((01 % 02) (03 || 04) - (05>06)) [Here 01,02,03,04,05,06 and 07 are objects of a class "overloading", and this class is having one integer data member]




"use strict";


process.stdin.resume();

process.stdin.setEncoding("utf-8");


let inputString = "";

let currentLine = 0;


process.stdin.on("data", (inputStdin) => {

inputString += inputStdin;

});


process.stdin.on("end", (_) => {

inputString = inputString

.trim()

.split("\n")

.map((str) => str.trim());

main();

});


function readLine() {

return inputString[currentLine++];

}


function main() {

let myArray = JSON.parse(readLine());


/* Please do not modify anything above this line */


/* Write your code here and log the output */

let min = myArray[0], result = undefined, index = 0;

while (myArray.length) {

myArray.map((e, i)=> {

if (e < min) min = e;

index = i

})

if (min % 3 === 0 && min % 2 === 0) {

result = min;

break

}

myArray.splice(index, 1);

min = myArray[0];

}


console.log(result)


}


other logic is solutiion


<div class="bg-container text-center">

<button class="get-activity-button p-1 mt-3" id="getActivityBtn">Get Activity</button>

<div class="mt-2" id="result">

<div class="d-flex flex-row">

<div class="w-50 d-flex flex-column justify-content-center text-center">

  <p id="activityName" class="activity-name">Buyanewhousedecoration</p>

<p id="activityType" class="activity-type">recreational</p> </div>

<div class="w-50"> <img src="https://assets.ccbp.in/frontend/react-js/ranactivity/party.png" id="activityImg" class="activity-img" /></div></div></div>

<div class="d-none mt-5 mb-5" id="spinner">

<div class="d-flex flex-row justify-content-center">

<div class="spinner-border" role="status">


"use strict";


process.stdin.resume();

process.stdin.setEncoding("utf-8");


let inputString = "";

let currentLine = 0;


process.stdin.on("data", (inputStdin) => {

 inputString += inputStdin;

});


process.stdin.on("end", (_) => {

 inputString = inputString

  .trim()

  .split("\n")

  .map((str) => str.trim());

 main();

});


function readLine() {

 return inputString[currentLine++];

}


function main() {

 let person = JSON.parse(readLine().replace(/'/g, '"'));


 /* Please do not modify anything above this line */


 /* Write your code here and log the output */

}



input1

{ 'name':'Pranay', 'address':{'city':'Mumbai','state':'maharastra'}, 'nicknames':['nani','chanti']}

output2


pranay is from mumbai,maharastra

pranay has 2 nicknames



length is not defined but output is come


(While loop structure)

Write a small program that displays a menu with the following options:


   A program that will calculate either the diameter, circumference, or area of a circle. Select your choice.

  1. Diameter
  2. Circumference
  3. Area 
  4. Quit

Use the switch statement. The program is to ask for the radius of a circle. Present the menu and execute the corresponding calculation.



LATEST TUTORIALS
APPROVED BY CLIENTS