Questions
Anything relating to reference variables or arrays will be so described. Assume any others are by...

Anything relating to reference variables or arrays will be so described. Assume any others are by value

8. Write the header line for the following functions - each function is named F1

A function returning a long and receiving as data parameters a short, an array of float and an array of double.

b. A function returning a reference to an int and receiving a 2 dimensional array of double with 23 columns.

c. Returning an int and receiving 3 int reference variables.

9. Write the following functions in full, including header line and body. Call each F1.

a. Receives 4 arguments, two arrays of short and two int's, one for each array, containing the count of array elements in that array. The function computes one grand total for both arrays. It then returns the grand total.

b. Receives an array of long. Returns the 2nd value stored in the array.

c. Write a function to receive a 2 dimensional array of long double with 10 columns. Also you will receive a short value representing the number of rows. The function totals all of the amounts in the array. The total of the values is returned as a long double.

d. . This function, F1, receives a pointer to an int array and a pointer to a double as arguments. It then calls the function called F2, which has the following prototype:

            void F2( int *arr, double num );

F1 is going to call F2 and send the array and the double value as arguments, receiving nothing back.

Write the entire function F1 which calls F2 as its only operation.

e. Change this function to reference variables:

int * fun1( float *a, int *b, float d)

{

                        *a = *b * d;

            return a;

}

Rewrite the entire function below:

In: Computer Science

Write a program for XXX Phones, a provider of cellular phone service. Prompt a user for...

Write a program for XXX Phones, a provider of cellular phone service. Prompt a user for maximum monthly values for talk minutes used, text messages sent, and gigabytes of data used, and then recommend the best plan for the customer’s needs. A customer who needs fewer than 400 minutes of talk and no text or data should accept Plan A at $29 per month. A customer who needs fewer than 400 minutes of talk and any text messages should accept Plan B at $35 per month. A customer who needs 400 or more minutes of talk and no data should accept either Plan C for up to 100 text messages at $45 per month or Plan D for 100 text messages or more at $50 per month. A customer who needs any data should accept Plan E for up to 2 gigabytes at $59 or Plan F for 2 gigabytes or more at $65. Save the file as Mobile.java

Again, Don’t forget to create the application/project  MobileTest.java Class that has the main method and an object to use the Mobile class.


Write a Java program to do the following:

Specifics:

Write a program for XXX Phones, a provider of cellular phone service. Prompt a user for maximum monthly values for talk minutes used, text messages sent, and gigabytes of data used, and then recommend the best plan for the customer’s needs. A customer who needs fewer than 400 minutes of talk and no text or data should accept Plan A at $29 per month. A customer who needs fewer than 400 minutes of talk and any text messages should accept Plan B at $35 per month. A customer who needs 400 or more minutes of talk and no data should accept either Plan C for up to 100 text messages at $45 per month or Plan D for 100 text messages or more at $50 per month. A customer who needs any data should accept Plan E for up to 2 gigabytes at $59 or Plan F for 2 gigabytes or more at $65. Save the file as Mobile.java

Again, Don’t forget to create the application/project MobileTest.java Class that has the main method and an object to use the Mobile class.

In: Computer Science

14. After you have reviewed all the safety tips, choose the three safety tips that you...

14. After you have reviewed all the safety tips, choose the three safety tips that you think can be most useful to you immediately. List these three tips as your answer to this question. For each tip, explain why it made your list.

In: Computer Science

MUST BE SOLVED USING [R] How to get the nth largest even value of given array?...

MUST BE SOLVED USING [R]

How to get the nth largest even value of given array? (Use while loop and if-statement for this problem. Do not use existing codes. Use your own codes). DO NOT USE ANY KINDS OF SORT FUNCTIONS.

For example, in given list [10,36,58,31,56,77,43,12,65,19], if n is defined as 2. The program will print 56.

In: Computer Science

Write Java Program. (Plot the sine and cosine functions) Write a program that plots the sine...

Write Java Program.

(Plot the sine and cosine functions) Write a program that plots the sine function in red and cosine in blue, as shown in Figure 14.48c.

Hint: The Unicode for P is u03c0. To display -2p, use Text(x, y, "-2\u03c0"). For a trigonometric function like sin(x), x is in radians. Use the following loop to add the points to a polyline:

Polyline polyline = new polyline ();

ObservableList<Double> list = polyline.getPoints ();

double scaleFactor = 50;

for (int x = -170; x <= 170; x++){

list.add(x + 200.0);

list.add(100 - 50 * Math.sin((x / 100.0) * 2 * Math.PI));

}

In: Computer Science

What are the new development in cellular network such as infrastructure and applications? What's your thoughts...

What are the new development in cellular network such as infrastructure and applications? What's your thoughts on future of the cellular/mobile network? *2 or more paragraphs*

In: Computer Science

PART B: Computing Fibonacci Numbers With Threads This programming project is based on a problem given...

PART B: Computing Fibonacci Numbers With Threads

This programming project is based on a problem given in our textbook. The Fibonacci sequence is the series of numbers 0, 1, 1, 2, 3, 5, 8,.... Formally, it can be expressed as: fib0 = 0 fib1 = 1 fibn = fibn-1 + fibn-2 Write a multithreaded program that generates the Fibonacci series using the pThreads library. This program should work as follows: The user will enter on the command line the number of Fibonacci numbers that the program will generate. The program will then create a separate thread that will generate the Fibonacci numbers placing the sequence in data that is shared by the threads (an array or vector is probably the most convenient data structure). When the thread finishes execution, the parent thread will output the sequence generated by the child thread. Because the parent thread cannot begin outputting the Fibonacci sequence until the child thread finishes, this will require having the parent thread wait for the child thread to finish, using the techniques discussed in the class

In: Computer Science

Write a simple PHP script. In your script use all of the following: HTML, Javascript, and...

Write a simple PHP script. In your script use all of the following: HTML, Javascript, and PHP.

In: Computer Science

JAVA PRACTICE PROBLEMS [ Thumbs up and good review guaranteed if code is correct! ] PART...

JAVA PRACTICE PROBLEMS [ Thumbs up and good review guaranteed if code is correct! ]

PART I: Implement a method comboDie that takes two dice parameters. The method returns a die with color (the combination of each die’s colors) and face value (the integer average of each die’s face values).

PART II: Using the Die class defined in PART I, design and implement a class called PairOfDice,composed of two Die objects as instance data. The class should include the following methods:

•A non-default constructor, i.e. with parameters

•A setter method for each instance data

•A getter method for each instance data

•A method roll() that rolls both dice

•A toString()method that returns a string containing the colors of both dice, eg “Colors of both dice: Red, Blue”

•A method pairSum that returns the current sum of the two die values. (PairOfDice.java)

PART III: Write an application TestPairOfDice that uses the PairOfDice class to create a pair of dice. The application prints to the screen the sum of their face values. The program then rolls the pair of dice and prints to the screen the new sum of their face values and the colors of both dice. (TestPairOfDice.java)

Edit: Die class is defined in PART 1 of the question where you do it.

In: Computer Science

Create a new website using C# & ASP.Net in Visual Studio: 1. Create a web page...

Create a new website using C# & ASP.Net in Visual Studio:

1. Create a web page to access a database and display the data from a table by providing an SQL statement. Create the page with these requirements:

    create label, textbox and button
    the textbox will capture the SQL statement
    the button will process the statement and display the results

2. Add necessary data access pages to your project.

3. Display the data in Gridview

In: Computer Science

what is the difference between FEATHER lightweight protocol and Searchable symmetric encryption? explain and give the...

what is the difference between FEATHER lightweight protocol and Searchable symmetric encryption?

explain and give the answer in terms of mobile cloud computing

In: Computer Science

Describe the networks that might be used to support a small manufacturing facility that supplies widgets...

Describe the networks that might be used to support a small manufacturing facility that supplies widgets to a large international manufacturing firm. The organization uses automation in their production, employs a small management staff (accounting, materials procurement, human resources, etc.), and receives their orders for widgets via electronic communications with the larger firm.

In: Computer Science

Conveniently Yours is a small family-owned neighborhood convenience store that sells products and Lottery tickets to...

Conveniently Yours is a small family-owned neighborhood convenience store that sells products and Lottery tickets to a very limited customer base. Their computing equipment is minimal with a point of sale (POS) computer, an office computer for inventory control, accounting, product acquisition, etc. Describe Conveniently Yours computing needs and their possible need for client/server, intranet, and/or cloud computing that would support his business operations.

In: Computer Science

Write a python program that asks the user to enter a student's name and 6 numeric...

Write a python program that asks the user to enter a student's name and 6 numeric tests scores (out of 100 for each test). The name will be a global variable. Create functions to calculate a letter grade for the student and calculate the average of the test scores for the student. The program should display a letter grade for each score, and the average test score, along with the student's name. Assume 6 students in the class.

Functions in the program:

the function should accept 6 test scores as arguments and return the average of the scores per student

the function should accept a test score average as an argument and return a letter grade for the score based on the following grading scale:

90-100        A

80-89          B

70-79          C

60-69          D

Below 60     F

Data for the program:

Jill Tree 70 66 87 82 75 73

Francis Ricks 90 93 87 84 91 93

Sally Smith 99 97 92 90 88 89

John Jones 72 86 59 69 72 78

Tommy Rimes    87 83 86 90 80 88

Erin Ames           66 69 72 61 73 71

In: Computer Science

Consider the following schema: Student(id, name) Registration(id, code) Course(code, instructor) A) Explain how we can violate...

Consider the following schema:
Student(id, name)
Registration(id, code)
Course(code, instructor)

A) Explain how we can violate the foreign key constraint from the id attribute of Registration to the Student relation.  
Ans.

B)Give the following queries in the relational algebra.

1)What are the names of students registered in IT244?   
Ans.


2 )What are the names of students registered in both IT244 and CS141?
Ans.                                

3)What are the names of students who are taking a subject not taught by Philips?
Ans.                            

C )For each of the following relational algebra queries, write in English what they mean.
1. Πinstructor (σcode=IT446 or code=IT230(Course))       
Ans.


2. Πname (σcode=IT446 (Student ⋈ Registration)) ⊔ Πname (σcode=IT441(Student ⋈ Registration))                      

Ans.

In: Computer Science