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

Given a string, write a program to re-arrange all the numbers appearing in the string in decreasing order. Note: There will not be any negative numbers or numbers with decimal part.


The ubiquitous nature of mobile phones today brings tremendous convenience to our lives, but

will misuse of new improvements to this technology result in the loss of that convenience? For

instance, camera phones are now banned in many fitness centers, park restrooms, and other simi-

lar facilities because some people have used them inappropriately to take compromising photos,

and mobile phones are banned in many classrooms because of the disruption of constant text

messaging and the use of the phone by dishonest students to cheat on exams. Do you think these

reactions to mobile phone misuse are justified? Is there another way to ensure the appropriate use

of mobile phones without banning their use for all individuals? Should there be more stringent

consequences for those who use technology for illegal or unethical purposes?


Write a program that inputs several(three) lines of text and a search string, and determines the total occurrences of the string in the lines of text.


Write a class and member functions for a class complex as follows

Class complex

{

    Int re, img;

     public:

    complex (int =0,int=0);

    complex(complex &);

    void accept();

    void display();

   complex add(const complex &);


CODE

#include <iostream>

class Rectangle

{

public:

Rectangle() {}

explicit Rectangle(float i) : length(i), breadth(i)

{}

Rectangle(float a, float b) :length(a), breadth(b)

{}

void Calculate() { std::cout << length * breadth<<std::endl; }



private:

float length {0},

   breadth {0};

};

int main()

{

Rectangle r1;

Rectangle r2{ 10 };

Rectangle r3{ 15,45 };

r1.Calculate();

r2.Calculate();

r3.Calculate();

return 0;

}

How do I write my name in beginning of this program ?

question is related to number string i passed two test cases as 1. I am 25 years and 10 months old---output(sum is 30, avg is 17.5) 2. tech foundation 35567 output(sum is 35567, avg is 35567.0)---got 2 text cases


but iam not getting 3. anjali25 is python4 expert output(sum=29, avg=14.5)

a=input().split()

sum=0

count=0

for i in a:

  is_digit=i.isdigit()

  if is_digit:

    number=i

    count+=1

    sum=sum+int(number)

print(sum)

avg=sum/count

print(avg)


Translate the following sentences into a Prolog program (10)


Everyone who teaches programming module is smart.


Craig teaches the programming module.


Craig’s brother teaches the mathematics module.


The programing module is interesting.


Craig’s sister teaches all modules.


Write necessary class and member function definitions for a cricket player object. (Use array of objects).

The program should accept details from user (max 10) : player code, name, runs, Innings, played, number of times not out.

The program should contain following menu:-

 Enter details of players.

 Display average runs of a single player.

Average runs of all players


Write an overloaded function to concatenate two strings using + operator overloading.


Design a code for inheritance for that consider three classes namely grandfather, father and child. Each one of them has a character data type member. Each class contain a pair of constructor and destructors. The father is derived from the class grandfather. Similarly the class child is derived from class father. The class grandfather is a base class of the class father. The class father is a base class of the class child. The class child is derived from the class father. The class father is intermediate classes that act as a base class as well as derived class. Constructors are executed from the base class to the derived class and destructors are executed from the derived class to the base class.


LATEST TUTORIALS
APPROVED BY CLIENTS