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 function called Reverse that takes in a string value and returns the string with the characters in reverse. If the string reads the same forwards as it does backwards the function should output “[word] is a palindrome!”.


Ex:

Reverse(“apple”)

outputs elppa

Reverse(“racecar”)

outputs racescar is a palindrome!


Hint: Make sure you take in your input and then make it lower case using the .lower() method.




Create a stack class in java where the stack is defined using an String type array and the size of the stack is provided by an instance variable. There should be an instance variable to track the top index of the stack. Define a constructor to initialize the size of the stack and the variable to track the top index of the stack. It is to be said that the minimum size of the stack should be 10. Define two methods void push(String item) and String pop() to conduct the insertion and deletion process in the stack. After filling up the stack with the maximum items possible, pop out 4 items from the stack and then output the sum of the remaining items in the stack.


USE;Dynamic Event Listeners

Achieve the given functionality.

  • When the HTML button element with the id createBtn is clicked,
  • Create an HTML main heading element with non-empty content and apply CSS property color using JS in an HTML container element with id myContainer

Resources

CSS Colors used:

Text colors Hex code values used:

#0000ff


USE;

Creating and Appending Elements Dynamically with JS.

Use the below reference image.

Achieve the given design using JS.

  • Create an HTML main heading element dynamically and append it to the HTML container element with the id myContainer.

Resources

CSS Colors used:

Text colors Hex code values used:

#0000ff


  • using Conversions and Conditional Statements.;
  • When the HTML button element with the id signInBtn is clicked,
  • If the username is empty then show the Please Enter Username message in the HTML paragraph element with the id messageText
  • If the username is not empty and the password is empty then show the Please Enter Password message in the HTML paragraph element with the id messageText
  • If the username and password are not empty then show the Welcome message in the HTML paragraph element with the id messageText

Achieve the given functionality using JS.

  • When the HTML button element with the id decreaseBtn is clicked,
  • If the count is odd then decrease the counter value by -1 as shown in the image.
  • If the count is even then decrease the counter value by -2 as shown in the image.
  • When the HTML button element with the id increaseBtn is clicked,
  • If the count is odd then increase the counter value by 10 as shown in the image.
  • If the count is even then increase the counter value by 5 as shown in the image.
  • When the HTML button element with the id resetBtn is clicked,
  • Set counter value as 0.

In main take two numbers as input num1 and num2. Main thread will create 2 more threads.

1. T1: Output sum of numbers from min(num1 , num2) to max(num1 , num2)

2. T2: Take a string as input and count num1 and num2 in it.


Define a function named "calAverage" which take a list of integers as parameter. This function will then calculate and store the average into a variable named "result". Finally, the function MUST return the result with 2 decimal place only. For Example given the following list, [2,6,8,3,4,6], the function will return 4.83 (float).


Define a function named "secondLarge" which take a list of numbers (integer) as parameter. This function will then identify and return the 2nd largest number in the list. The function will return smallest number if the parameter only contains two numbers. While the function will return the only number if the list contain only single number. On some odd case, the function will return -999 if the parameter contains other datatype i.e. string or floaat in the list.


Define a function named "isValidPassword" which take a string as parameter. The function will

then check if the supplied string fulfilled the following password criterias:

1) must have combination of uppercase and lowercase

2) must have at least 3 digits

3) must have at least 2 special character (including whitespace).

4) must have at least 10 characters (combination of alphanumeric and special symbol)

The function will return a Boolean value i.e. True if all criterias are met or return False

otherwise.

Make sure you test your function with every single possible input that may return False value

as well.



LATEST TUTORIALS
APPROVED BY CLIENTS