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 javascript program that asks the user to enter his or her first name and then last name, and then

constructs, stores, and displays a third string consisting of the user’s last name followed by a comma, a

space, and first name. Use string objects and methods from the string header file. A sample run could

look like this:

Enter your first name: Paul

Enter your last name: Smith

Here’s the information in a single string: Smith, Paul


Write a javascript program that asks the user to enter up to 10 golf scores, which are to be stored in an array. You should provide a means for the user to terminate input prior to entering 10 scores. The program should display all the scores on one line and report the average score. Handle input, display, and the average calculation with three separate array processing functions.


Given a M x N matrix, write a program to print the matrix after ordering all the elements of the matrix in increasing order

Input

The first line of input will contain two space-separated integers, denoting the M and N.
The next M following lines will contain N space-separated integers, denoting the elements of each list.
Output

The output should be M lines containing the ordered matrix.
Note: There is a space at the end of each line






Explanation

For example, if the given M is 3 and N is 3, read the inputs in the next three lines if the numbers given in the next three lines are the following.
1 20 3
30 10 2
5 11 15

By ordering all the elements of the matrix in increasing order, the ordered matrix should be
1 2 3
5 10 11
15 20 30
Question 5 (Marks: 40)
Design a Java application that will store three different vehicle details for a local car dealership.
The vehicle details must be stored in parallel arrays for the Vehicle Identification Number (VIN),
Vehicle Manufacturer and Vehicle Price. Use the following data as an example when populating
the arrays.
VIN Manufacturer Vehicle Price
112367 AUDI R 180 000
212367 BMW R 170 000
312367 VOLVO R 210 000
Prompt the user with a menu system for searching or displaying the vehicles. The user must have
the option to enter the numbers 1, 2, or zero (0) to exit the application. Make use of JOptionPanes
for input and output. Create a loadArray() method that will store the vehicle details into the three
parallel arrays.
If the user enters a one (1) provide functionality for a vehicle search. Create a searchArray()
method and write the code to enable the user to search for a specific vehicle. If the VIN is found in
the array, display the vehicle details.
Design a Java application that will allow a user to capture the top students for a module. Allow the
user to enter in the module name, followed by the number of students the user would like to
capture.
Continue to capture the results for the number of students entered. Once all the student results
have been captured create a results report.
In the results report display the student results entered, a student count and the average result
obtained.
Make use of a method to get the input from the user, another method to accumulate the student
results, a method to determine the average result and a final method to create the results report.
In your solution make provision if a user has entered in an invalid result amount. Any result
entered that is below zero (0) is an invalid entry.
Design a Java application that will allow a user to keep track of the sales of an employee. The user
should be presented with an option to enter the employee name and the sales amount.
Continuously prompt the user to enter in a sales amount for an employee until a sentinel value of
zero (0) is entered as a sale amount.
Please note that all input must occur in the Console window. Once the sentinel value has been
entered display the employee sales report.
Make use of a method to get the input from the user, another method to accumulate the sale
amounts and a final method to determine the average sale amount. In your solution make
provision if a user has entered in an invalid sale amount. Any sale amount entered that is below
zero (0) is an invalid entry.
Surname Score
1. Sam Williams 60
2. John Phoenix 85
3. Simon Johnson 75
4. Sarah Khosa 81
5. Mat Jackson 38
6. Nick Roberts 26
7. Isaac Wayne 74
8. Anna Mishima 34
9. Daniel Rose 64
10. Aaron Black 83
11. Jack Mohamed 27
12. Kathrine Bruckner 42
Create a C++ program that has 3 Stacks.
Insert, into the first stack, all the data above (which is the data of student’s names,
surnames and the marks they obtain in a particular assessment)
Display the content of the stack on the screen (console)
Then, remove all the students whose surname starts with the alphabets ‘R’, ‘J’ and
‘M’, from the first stack and insert them into the second Stack.
Display the contents of Stack1 and Stack2.
Finally, remove all the students whose marks are less than 50 from both Stack1
and Stack2 and insert them into the Third Stack.
Display the contents of all the 3 Stacks. (30)
Write a method that receives elapsed time for an event in seconds as a parameter. The
method then displays the elapsed time in hours, minutes, and seconds. For example, if the
elapsed time is 9630 seconds, then the method will display is 2:40:30. Write a main()
method that will prompt a user for elapsed time for an event in seconds, and use received
value to demonstrate that the method works correctly. Save the file as ElapsedTime.cpp
3
  1. Create a program that takes in the following CMD arguments: A car’s plate number (registration number), arrival time and departure time plus the cost for staying in the parking lot. Your task then  is to take these given information to print a simple receipt as indicated below (Don’t worry about the calculations for now.)

Sample run 1:

Java lab01_task04 N88W 8h30 9h45 6.25

Output:

Vehicle Details

N88W

++++++++++++++++++++++

Arrival             8h30

Departure       9h45

++++++++++++++++++++++

 Total Cost: N$ 6.25

++++++++++++++++++++++


Day Name - 2

Given the weekday of the first day of the month, determine the day of the week of the given date in that month.

Input

The first line is a string

D. The second line is an integer N.Output

The output should be a string.

Explanation

In the given example,

D = Monday. As the 1st of the day of the month is a Monday, it means the 7th and 14th of the month will be Sundays (A week has 7 days). So the 16th day (N = 16) of the month will be a Tuesday.So, the output should be

Tuesday


LATEST TUTORIALS
APPROVED BY CLIENTS