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

Create a class called computers and two classes MyComputer and YourComputer which inherits computer class. Define appropriate fields for the three classes. Create another class processor as a composite class of computer. Write a method which prints the differences between the processors of two computers.


Question 3: (Inheritance)

Create an abstract class called Employee that has an abstract method call computePay() which

computes the total pay per employee using the rate per hour = $50. The method should accept

the number of hours the employee has worked. Create a child class called employeeChild and

provide the implementation. In the main method invoke that method and get the number of hours

worked from the user and pass it to the called method.



Question 2 (Polymorphism)

Mathematically, the area of a rectangle is computed as length * width, the area of a circle is

computed as pi*radius*radius. Given that pi = 3.14, write a Java program with an overloaded

method called getArea() that can compute for the area of a circle or rectangle depending on the

parameters supplied. Illustrate how you will invoke the method in the main method for the two

scenarios.



You’re working on a search engine. Watch your back Google!



The given code takes a text and a word as input and passes them to a function called search().



The search() function should return "Word found" if the word is present in the text, or "Word not found", if it’s not.



Sample Input


"This is awesome"


"awesome"



Sample Output


Word found

Develop a Python application that will randomly select n integers from 1 to 45 without repetitions.


Sample Output 1:


How many numbers? 6 6 randomly selected nos. [21, 35, 16, 36, 5, 8]

Question 1: (Inheritance)

Consider a scenario where you have been given three classes, namely Vehicle, Bus, and

School_Bus. The School_Bus class is supposed to inherit all characteristics of both the Vehicle

and the Bus class. Explain and illustrate how you are going to achieve this considering you are using Java programming language.



Solve the following problem by showing the design of your solution as an algorithm.


The problem – The program will take two integers from the user, say n1 and n2. It will then print the sum of all numbers between n1 and n2, inclusive. For example, if the user enters 5 and 9, the program will print the value of 5+6+7+8+9. On the other hand, if the user enters 5 and -2, the program will print the value of 5+4+3+2+1+0+(-1)+(-2). Note: Do not assume the user will always enter the smaller number first.

Develop a Python application that will accept two non-negative integers and store them in a list and will append ten additional values equivalent to the sum of the two previous elements of the list.

Sample Output:

First Number: 1

Second Number: 3

[1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322]


What is the cybercrime act of the Philippines?


Create a class called Scholarship which has a function Public void Merit() that takes marks and fees as an input. Merit method should get an marks as input using params

If the given mark is >= 70 and <=80, then calculate scholarship amount as 20% of the fees

If the given mark is > 80 and <=90, then calculate scholarship amount as 30% of the fees

If the given mark is >90, then calculate scholarship amount as 50% of the fees.

In all the cases return the Scholarship amount


LATEST TUTORIALS
APPROVED BY CLIENTS