1. Given the following code, which method is an example of method overloading? Please select "A, B, C, D, or E" as correct option.
class Parent
{
public int show() { ... }
public int showIt(int x) { ... }
public int showMe() { ... }
public double showHow() { ... }
public void showAgain() { ... }
}
class Child extends Parent
{
public int show(int x) { ... }
public int showIt(int x) { ... }
public int showMe() { ... }
public int showHow() { ... }
public double showHow() { ... }
}
A. show()
B. showIt()
C. showMe()
D. showHow()
E. showAgain()
8. Develop a program by designing a class to represent a bank account. Include the
following members:
Data Members:
Name of the Depositor
Account Number
Type of account
Balance
Methods:
getdetails( ) ---To assign initial values
deposit( ) ---To deposit an amount
withdraw( ) ---To withdraw an amount after checking balance
display( )--- To display the name and balance.
Write a java program to calculate the income of sales person per week.
Itemcode
Item Name
Unit Price
Quantity
121
Shampoo
250.45
3
131
Soap
102.16
2
141
Talcum powder
98.23
3
145
Oxford Dictionary
500.24
4
6. Write a java application that inputs an integer containing only 0‘s and 1’s (i.e. a binary integer) and prints its decimal equivalent.
Write a Java application that ask the user to enter two integers, and prints their sum, product, difference and quotient (division).
[Use Scanner class present in java.util package and nextInt () method to read input].
Write a Java application that inputs from the user the radius of a circle as an integer and prints the circle's diameter, circumference and area using floating point value 3.1459 for pi. You may also use constant Math.PI for the value of pi. Class Math defined in package java.lang.
[Note: Use Scanner class present in java.util package and nextInt () method to red input].
3. Write a Java Application that inputs from the user temperature in Fahrenheit as an float and converts in to its equivalent Celsius temperature and print the result.(Formula:c=(f-32)*5/9)
[Note: Use Scanner class present in java.util package and nextFloat () method to red input].
Write a JavaScript code by using HTML and CSS
Program name is Custom Range Counter
Custom Range Counter
Instructions:
By following the above instructions, achieve the given functionality.
Here is the Output Image on link below
https://drive.google.com/file/d/1aUujQ6KsVQKmVEjnBuCeu16Nd0Pr1-al/view?usp=sharing
Greatest Among Four Numbers
Given four integers, write a program to print the greatest value among the four numbers.
Input
The first line of input will be an integer.
The second line of input will be an integer.
The third line of input will be an integer.
The fourth line of input will be an integer.
Output
The output should be a single line containing the greatest number.
Explanation
For example, if the given numbers are 5, 3, 7, 2. As 7 is the greatest among the four numbers, so the output should be 7.
Test Case 1:-
Input:-
5
3
7
2
Output:-
7
Test Case 2:-
Input:-
11
11
11
11
Output:-
11
We need all test cases can be came when code was run. I want exact outputs for all test cases
Create an algortihm using python.
• Move each bar from tower A to tower C. You can only move one bar at a time. You are not allowed to place the larger disk onto a smaller disk.
LINK PHOTO:
https://www.google.com/search?q=tower+of+hanoi+image&source=lnms&tbm=isch&sa=X&ved=2ahUKEwi6veGsgMPwAhVVFogKHVD6D2IQ_AUoAXoECAEQAw&biw=1366&bih=657#imgrc=W_DnmKgBwq_XxM
Create an algorithm, using python
Move each bar from tower A to tower C. You can only move one bar at a time. You are not allowed to place the larger disk onto a smaller disk.
def novel_or_knockoff(name, off_brand):
# novel_or_knockoff()
# @type:
# @rtype:
count = 0
for index in range(0,len(name)):
if name[index] != off_brand[index]:
count = count + 1
if count >= 3:
return "Novelty"
else:
return "Knockoff"
# Example: if Playstation [index] != playstation [index] :
count = count + 1
if count >= 3:
return "Novelty"
else;
return "Knokoff"
Write a program that computes and displays the charges for a patient’s hos- pital stay. First, the program should ask if the patient was admitted as an inpatient or an outpatient. If the patient was an inpatient, the following data should be entered:
• The number of days spent in the hospital
• The daily rate
• Hospital medication charges
• Charges for hospital services (lab tests, etc.)
The program should ask for the following data if the patient was an outpatient: • Hospital medication charges
• Charges for hospital services (lab tests, etc.)
The program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the inpatient data, and the other function accepts arguments for outpatient information. Both functions should return total charges. All functions should be tested individually.
Input validation: Do not accept negative values for any data, and make your program robust against accidental non-numeric data.