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

QUESTION 1: LOOPING

1. Suppose we want to validate the data captured for two variables programsDone and result in a while loop. The loop should be repeated until the value of result is greater than or equal to 50 and the value of programsDone is greater than or equal to 5. The variables result and programsDone are both of type int. Complete the while loop below. You only have to write down the completed while loop. [5 Marks]
Part 1


The volume of a sphere is 4/3πr3, where π has the value of "pi" given in Section 2.1 of your textbook. Write a function called print_volume (r) that takes an argument for the radius of the sphere, and prints the volume of the sphere.


Call your print_volume function three times with different values for radius.


Include all of the following in your Learning Journal:


The code for your print_volume function.

The inputs and outputs to three calls of your print_volume.


Part 2


Write your own function that illustrates a feature that you learned in this unit. The function must take at least one argument. The function should be your own creation, not copied from any other source. Do not copy a function from your textbook or the Internet.


Include all of the following in your Learning Journal:


The code for the function that you invented.

The inputs and outputs to three calls of your invented function.

A description of what feature(s) your function illustrates.
Using examples,evaluate the open source model of software development.In your discussion highlight some of its advantages and disadvantages.furthermore,explain some of the alternative that also exist.
Example 1: Define a function that takes an argument. Call the function. Identify what code is the argument and what code is the parameter.


Example 2: Call your function from Example 1 three times with different kinds of arguments: a value, a variable, and an expression. Identify which kind of argument is which.


Example 3: Create a function with a local variable. Show what happens when you try to use that variable outside the function. Explain the results.


Example 4: Create a function that takes an argument. Give the function parameter a unique name. Show what happens when you try to use that parameter name outside the function. Explain the results.


Example 5: Show what happens when a variable defined outside a function has the same name as a local variable inside a function. Explain what happens to the value of each variable as the program runs.
Critically outline the pro and con's of both strategies described above.which strategy do you favour?justify your answer with relevant theory
Discuss possible ramifications of these opposing objectives on the project.What would you do if you were the manager
Write a java programme that will counts all number of words in a sentence.The programme should have a minimum of two classes
Write a java programme that will compute the future investment at a given rate intereste for specified years.The programme should have a minimum of two classes.
Create a code that plots 1000 random points each with their own random color on a user interface
Perform this in C language

Q1. Create a struct called Invoice that a hardware store might use to represent an invoice for an item sold at the store. An Invoice should include four data members—a part number (type string), a part description (type string), a quantity of the item being purchased (type int) and a price per item (type float). Your program should initialize the four data members. In addition, it should calculate the invoice amount (i.e., multiplies the quantity by the price per item), If the quantity is not positive, it should be set to 0. If the price per item is not positive, it should be set to 0. Write a test program that demonstrates struct Invoice’s capabilities. Note: Perform this work using 1. 2d array 2. pointer to 2d arrays 3. design function for calculating the results by passing array to function by value and by reference.

Expert's answer
LATEST TUTORIALS
APPROVED BY CLIENTS