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

Company ABC, an airline company is closely monitoring the distance between airplanes as they take-off on the same airport. You are asked to create a system that would calculate the distance between two planes A and B given the following plane attributes: Take-off Time, Speed (mi/hr), direction (north, east, west, south). Also, given the time where the navigation officer would like to check the distance.


Write a C++ program in which, read data from user into an integer array and an integer n. now rotate the array n times. 



Write a C++ program in which, read data from user into an integer array and an integer n. now rotate the array n times. 



Write a C++ program in which, read data from user into an integer array. Now remove all duplicate values. 



Write a program that initialize 10 values in arrays. Your program asks a number from user and prints only last location of entered number. 


Display record of all the students greater than X marks in final exam (in ascending order with respect to marks obtained in final exam). The value of X will be entered by the user. 


Display record of all the students greater than X marks in final exam (in descending order with respect to marks obtained in final exam). The value of X will be entered by the user.


Write a C++ menu base program in which, perform following tasks on an integer array of size 20:  Press 1 for insert data  Press 2 for display data o Press 1 for display full array o Press 2 for display array till mid o Press 3 for display array from mid o Press 4 for display array between given range  Press 3 for delete data  Press 4 for update data  Press 5 for search data o Press 1 for binary search o Press 2 for liner search  Press 1 for check presence  Press 2 for count occurrence  Press 3 for display index of each occurrence  Press 6 for sort data o Press 1 for ascending order o Press 2 for descending order  Press 7 for reverse the data  Press 8 for maximum data  Press 9 for minimum data  Press 10 for average value  Press 11 for remove all data from array  Press 12 for check array is empty or not  Press 13 for check array is full or not  Press 14 for exit


Create a game program using C++.

The game specifications are the following:

1. The user has 3 types of player against a monster.

Master Life = 10 Super Power = Double attack (1 time) Damage = Life to 0 if double attack was used Healer Life = 10 Super Power = Restore life of warrior (1 time) Damage = attack / 2 if healing power was used

Warrior Life = 10 No super power

2. Every attack of monster cause equal damage to player’s life. Deduct monster’s attack to player’s life 3. Effect of player attack to monster depends on how player attack

4. Player’s super power (master and healer) can only be used once throughout the game.

5. Player with 0 life is not allowed to attack

6. Monster has an initial life of 30

7. The game will continue until monster is defeated or all players are dead.

Required:

1. Use inheritance to create the program.

2. Display current life status in the given format (see testcase)

3. Ask user to choose a player ‘m’ for master, ‘h’ for healer and ‘w’ for warrior. If user selects master or healer, ask user if they want use the super power if yes, apply proper attack value to monster else perform a simple attack.

Note: They can only use each super power once. Current life = previous life – attack

4. Generate random number from 1 to 6 as the attack value of both players and monster.

Note: remove srand() on monster attack

5. At the end of a single round, display current status after the attack (see test case)

6. Player with zero life is not allowed to attack thus inform user to choose another player.

Note: if user selects dead player, the round will still be the same.

7. Use looping statement to generate rounds of the game. The program will only terminate if the total life of the team (life of master + life of Healer + life of warrior) is equal or less than zero thus, monster won the game or the life of monster is equal or less than zero.

8. Do not display negative life. If current life is less than 0 after the attack then display zero.


IN THE FORM OF PROCEDURAL PROGRAMMING;

CREATE A PROGRAM THAT COMPUTES THE AREA OF A GIVEN RECTANGLE AND A CIRCLE.

AREA OF RECTANGLE = LENGTH * WIDTH

AREA OF CIRCLE = 3.1416 * RADIUS 2

1. In procedural programming, create a function named "getArea()" with the following parameters.

a. int length

b. int width

c. int radius

Note. Use the following variable names


2. The function must have 2 main procedures which are:

Solving of the area of the rectangle (Variable name = recta)

Solving for the area of the circle (Variable name = cira)

Note. Printing the answer must be included in the function.


3. In the main() program of the source file, allow user to enter the length of the rectangle (Variable name =rectlength,) , width of the rectangle (variable name =rectwidth, and the radius of the circle (variable name = cirradius)


4. Call "getArea" function using the user input


TEST CASE #1

Length of Rectangle: 7

Width of Rectangle: 5

Radius of Circle: 5

Area of rectangle = 35

Area of rectangle = 78.54




LATEST TUTORIALS
APPROVED BY CLIENTS