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 timeStamp that represents a time of the day. It must have variables to store the number of seconds, minutes and hours passed (insert the values in SSMMHH format). It also must have a function to print all the values. You will also need to overload a few operators (==, !=, <, >, <<)


This input should be a valid integer and must be between 1 and 15 only. If the user enters invalid input, the default level is Level 10. How would I code this?


Write a python program that asks the user for a string input. This input corresponds to an attachment that changes the stats of your gun.


Attachments!

 monolithic suppressor: +5 damage, -5 mobility

 owc_skeleton_stock : +5 mobility, -8 Accuracy

 owc_laser_tactical : +5 accuracy, +5 control

 operator_foregrip : +10 control, -2 mobility


Inputs are case-insensitive. E.G. OWC Compensator == owc compensator.

P.S. No imports.


Users can be able to input multiple gun attachments by adding a semicolon; in between the attachments. There must be no whitespace present in the inputs. You might need loops to answer this question.



Print out the final stats of the gun in this format:


Man-O-War Updated Stats!

Damage: {damage}

Fire Rate: {fire rate}

Accuracy: {accuracy}

Mobility: {mobility}

Range: {shooting range}

Control: {control}


Example

User input: owc skeleton stock;owc laser tactical


Output:

Man-O-War Updated Stats!

Damage: 49

Fire Rate: 50

Accuracy: 66

Mobility: 64

Range: 56

Control: 58


Write an algorithm that takes the positive integer ‘n’ as input and returns the exponent 2^n as output. Analyze the time complexity of the algorithm using program step table method.


Sort the following elements using merge sort technique 

using the Divide and Conquer strategy. {12,45, 6, 18, 10, 4, 3, 1, 13, 15, 16}


Define a class named as Vehicle Contain data members(Minimum 3) Color, Wheels etc. Contain member functions( Minimum 3) Include a prototype and def of copy constructor A default constructor An Overloaded constructor No Need to define the functions Call the functions using OmniBus in main and use overloaded constructors to set values. Use copy constructors to make copy of OmniBus to a constructor SchoolBus


given myArray of numbers, write a function to square the alternate numbers of the myArray, starting from index 0 using the array method map.Input

  • input will be a single line containing  myArray

Output

  • output should be a single line containing an array with alternate numbers squared

Constraints

  • Each value in the array must be a number

1 Input

[ 1, 2, 3, 4, 5 ]

1 Output

[ 1, 2, 9, 4, 25 ]

2 Input

[ 2, 4 ]

2 Output

[ 4, 4 ]

"use strict";

process.stdin.resume();

process.stdin.setEncoding("utf-8");

let inputString = "";

let currentLine = 0;

process.stdin.on("data", (inputStdin) => {

 inputString += inputStdin;

});

process.stdin.on("end", (_) => {

 inputString = inputString.trim().split("\n").map((str) => str.trim());

 main();

});

function readLine() {

 return inputString[currentLine++];

}

/*not modify above this line */

function main() {

 const myArray = JSON.parse(readLine());

 /* Write your code here */


Array of String to UpperCase

myArray of strings as an input, write a JS program to convert all the strings in myArray to uppercase.Input

  • The input will be a single line containing an array myArray

Output

  • The output should be a single line containing an array of strings in uppercase

Sample Input 1

[ 'book', 'table', 'strawberries', 'lemons' ]

Sample Output 1

[ 'BOOK', 'TABLE', 'STRAWBERRIES', 'LEMONS' ]

Sample Input 2

[ 'my best friend', 'florida', 'winter' ]

Sample Output 2

[ 'MY BEST FRIEND', 'FLORIDA', 'WINTER' ]


"use strict";


process.stdin.resume();

process.stdin.setEncoding("utf-8");

let inputString = "";

let currentLine = 0;

process.stdin.on("data", (inputStdin) => {

 inputString += inputStdin;

});

process.stdin.on("end", (_) => {

 inputString = inputString.trim().split("\n").map((str) => str.trim());

 main();

});

function readLine() {

 return inputString[currentLine++];

}

/* not modify anything above this line */


Create a file given“Address”with proper ios flags.

.

Write 5 lines in the file and each line should have a Student’s data in the following format:(10)


Name: Address: Phone Number

.


e.g


Alyan: Khayaban-e-Jinnah,UCP: 030012345678


Read the file and display all the numbers

Students

data whose number starts with 0300. (15)



Write the algorithm, draw the flowchart, write and execute the Dart code for the following problem.

A student’s Midterm grade is 60 and the Final Grade is 80. The weight of Midterm and Final exams are % 40 and % 60 respectively.

Find the semester grade for this student.



LATEST TUTORIALS
APPROVED BY CLIENTS