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 an abstract class GeometricObject with lineColor as data member. GeometricObject must ensure that its children implement calcArea() method. Design Rectangle and Circle classes as children of GeometricObject class with overridden toString() method to return “ Rectangle with ‘w’ width and ‘h’ height is drawn” OR “Circle with ‘r’ radius is drawn”.

- The attribute of Rectangle are length and width

- The attribute of Circle is radius


*Hint:

Area of Circle= πr2

Area of Rectangle=w*l
Write Java Code to input a complete paragraph, as an input. Further, read a single character/letter. Finally, you are required to [Marks = 02]

(a) - Count the number of Words in the paragraph starts with the letter taken as input from the user.

(b)- Display the total number of words in the paragraph

Implement all this scenario using OOP Concepts of Java. Your code should also take care of the exceptions that can occur while dealing with Strings.
Java program to

a. Accept names and marks of 10 students from user

b. Ensure that valid data is entered. If user enters an invalid data then appropriate message should be displayed, e.g. “Name cannot be a number” or “Marks must be an integer value”

c. Display this data in descending order according to the marks such that name of the student having maximum marks should be displayed at the top and the name of the student having minimum marks should be displayed at the bottom.
Give an example of a while loop, then provide the equivalent do-while loop and for loop. Then give a different example of a do-while loop, along with the equivalent while loop and for loop. Finally, give an example of a for loop, along with the equivalent while loop and do-while loop. Use your examples to illustrate the advantages and disadvantages of each looping structure, and describe those advantages and disadvantages.
c) Simplify the expression f(a,b,c)=a.b+a.(b+c)+(a.b.(c+b.d)+a.b).c.d using rules of Boolean algebra

d) Compute the value of 3AB16-43510-6178 using 1’s complement arithmetic leaving your final answer in Octal.
AziTech is considering the design of a new CPU for its new model of computer systems for

2021. It is considering choosing between two (2) CPU (CPUA and CPUB) implementations

based on their performance. Both CPU are expected to have the same instruction set

architecture. CPUA has a clock cycle time of 60 ns and CPUB has a clock cycle time of 75

ns. The same number of a particular instruction type is expected to be executed on both CPUs

in order to determine which CPU would executes more instructions. CPUA is able to execute

2MB of instructions in 5*106 clock cycles. CPUB executes the same number of instructions in

3*106 clock cycles.
Design an abstract class GeometricObject with lineColor as data member. GeometricObject must ensure that its children implement calcArea() method. Design Rectangle and Circle classes as children of GeometricObject class with overridden toString() method to return “ Rectangle with ‘w’ width and ‘h’ height is drawn” OR “Circle with ‘r’ radius is drawn”.

- The attribute of Rectangle are length and width

- The attribute of Circle is radius


*Hint:

Area of Circle= πr2

Area of Rectangle=w*l
Write Java Code to input a complete paragraph, as an input. Further, read a single character/letter. Finally, you are required to

(a) - Count the number of Words in the paragraph starts with the letter taken as input from the user.

(b)- Display the total number of words in the paragraph

Implement all this scenario using OOP Concepts of Java. Your code should also take care of the exceptions that can occur while dealing with Strings.
Create a class named 'Member' having the following members:

Data members

1 – Name

2 – Age 3 - Phone number

4 – City 5 – Salary

,Two classes 'Employee' and 'Manager' inherits the 'Member' class. The 'Employee' and 'Manager' classes have data members 'specialization' and 'department' respectively. Now,

(a)- Assign name, age, phone number, city and salary to an employee and a manager by making an object of both of these classes and print the same.

(b)- Add a method to the above class, searchBySpecialization(), which inputs the Specialization from user and print all the Employees with the entered specialization

(c)- Add another method to the above class searchBySalary(), which inputs the two Values of the Salary Minimum and Maximum and then show all the Employees with Salary in the entered range of the Salary and with Age <50.
Write Java program to

a. Accept names and marks of 10 students from user

b. Ensure that valid data is entered. If user enters an invalid data then appropriate message should be displayed, e.g. “Name cannot be a number” or “Marks must be an integer value”

c. Display this data in descending order according to the marks such that name of the student having maximum marks should be displayed at the top and the name of the student having minimum marks should be displayed at the bottom.
LATEST TUTORIALS
APPROVED BY CLIENTS