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

Write a class C2 that inherits all the functionality of A2 and B2,

// with the same stipulation that it should take f() from A2 and g() from B2.


Write a class named "BankAccount" with the following attributes: id, currency and balance. The class has a constructor with only two of the attributes: id and currency. The value of the currency, if omitted, has a default value "EUR0". The third attribute by default is zero. We suppose that when we activate a bank account its balance is initially empty.


Task 2:

Write a Python class named "Calculator" that has no attributes.The class has only one method named "performOperation()" that takes in input three parameters, two numeric values (A and B) and one string value representing one of the four basic mathematical operations (+","", "*" or "/"). For each operation, it returns the result of the respective operation for the two numbers. In case the second value is zero and the operation is "/", the method returns a string message "Error: Can not divide by zero". If the operation is not as expected, the method returns a string message "Error: Operation not supported".


Write a Python class named "Pencil" that has three attributes: brand (string), color (string), thickness (int).

The class must include a constructor method that initializes each variable to an appropriate value, and the class should include methods for setting the value of each type and retrieving the value of each type.


The table given below shows the list of gases, liquids and solids. By entering the substances, find the state of the material. Implement the above logic through C++.


S.No.


Materials


1


Water


2


Oxygen


3


Gold


4


Ice


5


Petrol




Create a class called employee that contains a name (an object of class string) and an employee number (type long). Include a member function called getdata() to get data from the user for insertion into the object, and another function called putdata()to display the data. Assume the name has no embedded blanks.

Write a main()program to exercise this class


Trekking Kit


Given an object


trekkingKit in the prefilled code and item item as an input, write a JS program to add the method isKitContains to the constructor function Trekking using the prototype.


The method


isKitContains checks whether the trekkingKit contains the given item.


Quick Tip

The Object.getOwnPropertyNames() method gives an array containing the properties of the object.

Input


The input will be a single line containing a string


item


Output


The output should be a single line containing a boolean value


Sample Input 1

ruckSackBag

Sample Output 1

true


Sample Input 2

surfboard

Sample Output 2

false


Hotel Bill

A Hotel is offering discounts to its customers.

Given charge per day

dayCharge based on category and numbers of days customer stayed days as inputs, write a JS arrow function to return the total bill with the discount.


Quick Tip

  • The formula for bill is,
  • bill = dayCharge * days
  • The formula to calculate the discounted bill,
  • bill - (bill * discount) / 100

Apply discounts on the following basis,

  • 5%, if the customer stays more than 2 days
  • 15%, if the customer stays more than 5 days

Input

  • The first line of input contains a number dayCharge
  • The second line of input contains a number days

Output

  • The output should be a single line containing the total bill with the discount


Sample Input 1

200

3


Sample Output 1

570


Sample Input 2

180

1


Sample Output 2

180

Sample Input 2

400

6


Sample Output 2

2040


write c++ program find factorial number input


Write a short note on the following graphic formats and state one (one) example under each?                        i. Vector graphics ii. Raster graphics b) What is the difference between Multimedia Software and Multimedia Hardware? c) State the difference between the following and state any two (2) examples under each?  i. Lossless and lossy ii. Symmetrical and asymmetrical  


LATEST TUTORIALS
APPROVED BY CLIENTS