Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

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

Design simple class BankAccount. If amount to be withdrawn is greater than balance, throw “Insufficient Balance” exception.


Design a template function for swapping the int, double and char type values between two variables. Note: Use function overloading.



Suppose there are some employees working in a firm. The firm hires only two types of employees- either driver or developer. Now, you have to develop a C++ program to store information about them. Employee class has name and getEmployee(), declare showEmployee() as pure virtual function. There is no need to make objects of employee class. Make objects to only driver or developer. Also, both must have experience and salary. Set default salary 15000 for developer and 6000 for driver. Provide salary according to their experience. Give 500 rupees extra for each 1 one year of experience. Make Employee as an abstract class and Developer and Driver its subclasses. Use abstract class and Pure virtual functions concept.


Develop a C++ programs on BANKING SYSTEM have Customer class with name, address and phoneno. Create derived class account class with data members like account number, name, deposit, withdraw amount and type of account. A customer can deposit and withdraw amount in his account. Develop a C++ program to display the details of a customer and the remaining balance amount. [Note: Use virtual function]


Develop a C++ program to read the value from user and display the address using wild pointer.


Construct the C++ program using operator function with type conversion to convert the distance in meters in centimeters and vice versa.


The union bank needs to convert rupees to dollar and vice versa perform this conversion using conversion routines (here rupees and dollar are two classes).


Develop a C++ program to increment the complex number by overloading ++ operator.


Develop a code for the multiple inheritance diagram given below

·    The publisher base class consisting of data members such as pname and place, and member functions get() and display().

·    The author base class consisting of data members such as aname, and member functions get() and display().

·      The book derived class inherits the two base class publisher and author consisting of data members such as title, price and pages, and member functions get() and display().


Numbers in String - 1


Given a string, write a program to return the sum and average of the digits of all numbers that appear in the string, ignoring all other characters.


Input


The input will be a single line containing a string.


Output


The output should contain the sum and average of the digits of all numbers that appear in the string.

Note: Round the average value to two decimal places.


Explanation


For example, if the given string is "I am 25 years and 10 months old", the digits of all numbers that appear in the string are 2, 5, 1, 0. Your code should print the sum of all digits(8) and the average of all digits(2.0) in the new line.


Sample Input 1

I am 25 years and 10 months old


Sample Output 1

8

2.0


Sample Input 2

Tech Foundation 35567


Sample Output 2

26

5.2


Sample input 3

Anjali25 is python4 Expert


Sample Output 3

11

3.67


LATEST TUTORIALS
APPROVED BY CLIENTS