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

Similar to previous, make Student class with 4 data members (name, roll no, GPA, credit hours) and 2 constructors (one user input, one file input) and a destructor.


Split and Replace

Given three strings 

inputString, separator and replaceString as inputs.

Write a JS program to split the 

inputString with the given separator and replace strings in the resultant array with the replaceString whose length is greater than 7.

Quick Tip
You can use the string method split()
You can use the array method map()
Input
The first line of input contains a string inputString
The second line of input contains a string separator
The third line of input contains a string replaceString
Output
The output should be a single line containing the strings separated by a space
Sample Input 1
JavaScript-is-amazing
-
Programming
Sample Output 1
Programming is amazing

Sample Input 2
The&Lion&King
&
Tiger
Sample Output 2
The Lion King
String Ending with Vowel

Given an array of vowels in the prefilled code and a string 

inputString as an input, write a JS program to check whether the inputString ends with a vowel.

Quick Tip
You can use the string methods toUpperCase() and endsWith().
Input
The input will be a single line containing a string inputString
Output
The output should be a single line containing a boolean value
Sample Input 1
Five
Sample Output 1
true

Sample Input 2
Apples grow best where there is cold in winter
Sample Output 2
false


Given an array 
myArray of numbers, write a JS program to perform the following steps and log the result.
Multiply each value with 9.
Subtract 20 from each value.
Multiply each value with 7.
Log the values of the resulting array separated by a space.
Input
The input will be a single line containing an array myArray
Output
The output should be a single line with values separated by a space
Constraints
Each value in the array must be a number
Sample Input 
[ 12, 2, 2, 4, 1 ]
Sample Output 
616 -14 -14 112 -77
"use strict";
process.stdin.resume();
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++];
}
function main() {
  const myArray = JSON.parse(readLine());
  /* Write your code here */
}

Given a list of integers, write a program to identify the contiguous sub-list that has the largest sum and print the sum. Any non-empty slice of the list with step size 1 can be considered as a contiguous sub-list.


Make two 3D-points in a 3-Dimensional space. Calculate the distance between these two points. Instead of integer data type, use any other datatype for x,y,z values. Create an object pt, and call distance function as pt.Distance(pt2), which will calculate the distance between two 3-D points.



Similar to previous, make Student class with 4 data members (name, roll no, GPA, credit hours) and 2 constructors (one user input, one file input) and a destructor.


Make a 3DPoint class with 2 constructors and a destructor. Constructor should take input from file_name passed, Constructor 2 should input from user. Destructor should output id of destructed object.


Make a 3DPoint class with constructor and destructor. The constructor should take input from the user. Destructor should output the id of the destructed object.


Create array of structure to store the details of voter. Create a menu for data creation, display, and check the availability of data and eligibility to vote. Also check if he is eligible to vote.


LATEST TUTORIALS
APPROVED BY CLIENTS