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

Anti-Diagonals

Given a MxN matrix,write a program to print all Anti-Diagonals elements of matrix

Input

The first line of input will contain a M, N values separated by space.

The second line will contain matrix A of dimensions MxN.

Output

The output should contain anti-diagonal elements separated by a line.

Explanation


Question 3 – Entity Relationship Diagrams (Marks: 45)


Dineo has given what she wants to display on the website a lot of thought. And she has come up with quite a comprehensive set of business rules.

Launch Data To Be Displayed


1. A launchpad hosts multiple launches over time, and each launch is hosted by exactly one launchpad. Launchpads will be created in the database even before the first launch is hosted there.


2. A launchpad is located in a country, and a country in turn is located on a continent.


3. Each launchpad has a name and a location.


4. A launch requires three things: a launchpad that hosts it, a launch vehicle (the rocket), and the payload.

...


Draw an Entity Relationship Diagram (ERD) using Unified Modelling Language (UML) notation, representing these business rules. Your design should be at the logical level – include surrogate primary key and foreign key fields and remember to remove any many‐to‐many relationships.



Abhinav and Anjali are playing Rock-Paper-Scissors game. Rock-Paper-Scissors is a hand game usually played between two people, in which each player simultaneously forms one of three shapes with an outstretched hand. These shapes are "rock", "paper" and "scissors". Based on the shapes the player chooses the outcome of the game is determined. A rock beats scissors, scissors beat paper by cutting it, and paper beats rock by covering it. If the same shape is chosen by both of the players, then it is tie. Write a program to decide the winner of each round of the game based on the shapes the players chose.Input


The first line of input will be one of the strings "Rock", "Paper", "Scissors", representing the shape chosen by Abhinav.


The output should either be "Abhinav Wins" or "Anjali Wins", based on the winner. If it is a tie, the output should be "Tie".




Given the number of rows N, write a program to print the hallow diamond pattern similar to the pattern shown below.

    A
   B B
  C   C
 D     D
E       E
 D     D
  C   C
   B B
    A

The input will be a single line containing a positive integer (N).Output


The output should be (2*N - 1) rows and (2*N - 1) columns containing the alphabet characters in the hollow diamond pattern.Explanation


For example, if the given number is 5, the pattern should contain 9 rows and 9 columns as shown below.

    A
   B B
  C   C
 D     D
E       E
 D     D
  C   C
   B B
    A

Make a loop for a different number of years and stop in years worth enter as 0, 99 or higher or negative numbers Prompt the user for the salary per year and calculate the Christmas bonus based on the number of years work as follow for 1 to 5 years 1% of gross pay, and six or more years to percent of gross pay


Question 1 Given that the messages y1, y2, y3, y4, y5 with the corresponding probabilities 0.4, 0.2, 0.2, 0.1, and 0.1 a) Construct a binary code by using a Shannon Fano Algorithm to determine?

I. Code efficiency ii. Redundancy of the code iii. Code tree


Question 2 a) Consider a Huffman’s Algorithm that uses a variable-length encoding scheme to compress the original text: GOOD DAY to determine the following?

I. Code tree ii. Codeword iii. Average code length


Question 3 a) Write a short note on the following and state any two (2) practical examples under each? I. Impact printer ii. Non-impact printer b) What is the difference between Additive Color and Subtractive Color and two (2) examples under each?


2. Write a program to determine the price for a portrait sitting. The price is determined by subjects in portraits, background chosen and sitting appointment day.

The fee schedule is shown below. 

Fancy background and sitting appointment cost an extra 10 percent more than the base price.

 

Subjects in Portrait

Base Price

1

$100

2

$130

3

$150

4

$160

5 or more

$165

Sample Output1:

Enter the number of subjects in the portrait: 1

Do you want a fancy background (y/n)? y

Do you want an appointment date (y/n)? y

The price is: $120

 

Sample Output2:

Enter the number of subjects in the portrait: 6

Do you want a fancy background (y/n)? y

Do you want an appointment date (y/n)? n

The price is: $181.5


Consider a bit streaming scenario for a video where the following values apply: – The buffer size is 1 MiB – The low watermark is set at 100KiB – The high watermark is set at 900KiB – The incoming data rate is 1Mbps – The video display rate is 300 Kbps

 Assume that the video is playing and that the buffer content has dropped to the low-water mark. The media player sets the controls for data input to begin again



Consider a bit streaming scenario for a video where the following values apply: – The buffer size is 1 MiB – The low watermark is set at 100KiB – The high watermark is set at 900KiB – The incoming data rate is 1Mbps – The video display rate is 300 Kbps


Design a QUIZ Application in Java. The first is called the Warm-up Round; the second is the Challenge round. In the warm-up round, the user is asked a total of 5 simple questions. If they manage to answer at least 4 of them correctly to enter the next round. If the user is not capable of doing that, he is not permitted to proceed further.


LATEST TUTORIALS
APPROVED BY CLIENTS