Assignment Questions

Question & Answer: Computer Science C#…..

Computer Science C#

Question 3 5 pts Which of the following supports LINQ? u.instructure.com/courses/437443/quizzes/822471/take Quiz: Final Exam Object collection XML Document All of the above None of the Above Question 4 5 pts A class must implement interface in order to provide querying facility using LINQ. IEnumerator or lQueryable IEnumerable or ILinqQuery Enumerable or IsqlQuery None of the above

Which of the following supports LINQ? Object collection XML Document All of the above None of the Above A class must implement ___ interface in order to provide querying facility using LINQ. Enumerator or IQueryable IEnumerable or ILinqQuery Enumerable or IsqIQuery None of the above

Expert Answer

 

LINQ can support both object collection and xml do

Read more

Question & Answer: at runtime. Value will be assigned when it accessed first time Are the same as co…..

Question 1 5 pts Which of the following is true for ReadOnly variables? Value will be assigned at compile time. O Value can be assigned at runtime. O Value will be assigned when it accessed first time Are the same as constants Question 2 5 pts Func and Action are the types of Utility function Delegate O Event structs

Computer Science C#

Which of the following is true for ReadOnly variables? Value will be assigned at compile time. Value can be assigned at runtime. Value will be assigned when it accessed first time Are the same as constants Func and Action are the types of ___. Utility function Delegate Event structs

Expert Answer

Read more

Question & Answer: Write a program with an array that is initialized with test data. Use any primitive data type of your choice. The program s…..

Write a program with an array that is initialized with test data. Use any primitive data type of your choice. The program should also have the following methods:

getTotal. This method should accept a one-dimensional array as its argument and return the total of the values in the array.

getAverage. This method should accept a one-dimensional array as its argument and return the average of the values in the array.

getHighest. This method should accept a one-dimensional array as its argument and return the highest value in the array.

getLowest. This method should accept a one-dimensional array as its argument and return the lowest value in the array.

package name operations. To receive full credit make sure you include comments in every significant line of a code. language is java

Expert Answer

 

package operation;

public class Operation {

Read more

Question & Answer: Write a program with an array that is initialized with test data. Use any primitive data type of your choice. The p…..

Write a program with an array that is initialized with test data. Use any primitive data type of your choice. The program should also have the following methods:

getTotal. This method should accept a one-dimensional array as its argument and return the total of the values in the array.

getAverage. This method should accept a one-dimensional array as its argument and return the average of the values in the array.

getHighest. This method should accept a one-dimensional array as its argument and return the highest value in the array.

getLowest. This method should accept a one-dimensional array as its argument and return the lowest value in the array.

package name operations

Expert Answer

 

public class ArrayTotalAverageHighestLowest {

Read more

Question & Answer: Solve the recurrence relation : T(n) = T(n/2) + n3, T(1)=1……

Solve the recurrence relation : T(n) = T(n/2) + n3, T(1)=1.

1.Draw the first three levels of the recurrence tree.

2.Solve the recurrence to find a formula and find the Big(Oh) complexity.

Expert Answer

Read more

Question & Answer: A painting company has determined that for every 100 square feet of wall space, one gallon of paint and eight hours of labor…..

A painting company has determined that for every 100 square feet of wall space, one gallon of paint and eight hours of labor will be required. The company charges $20.00 per hour for labor. Write a program that allows the user to enter the number of rooms (10pts) to be painted and the price of the paint per gallon. It should also ask for the square feet of wall space in each room (10 pts). The program should have methods that return the following data:

The number of gallons of paint required (15 pts)

The hours of labor required (15 pts)

The cost of the paint (15 pts)

The labor charges (15 pts)

The total cost of the paint job (15 pts)

Then it should display the data on the screen. (5 pts).

package name paint

Expert Answer

 

import java.text.DecimalFormat;

import java.util.Scanner;

Read more

Question & Answer: Write a program that tests your ESP (extrasensory perception). The program should randomly s…..

Write a program that tests your ESP (extrasensory perception). The program should randomly select the name of a color from the following list of words:

Red, Green, Blue, Orange, Yellow

To select a word, the program can generate a random number. For example, if the number is 0, the selected word is Red, if the number is 1, the selected word is Green, and so forth.

Next, the program should ask the user to enter the color that the computer has selected. After the user has entered his or her guess, the program should display the name of the randomly selected color. The program should repeat this 10 times and then display the number of times the user correctly guessed the selected color. The dialog box must show to receive full credit with comments on every significant line of a code.

package name is esp

Expert Answer

 

import javax.swing.*;
import java.util.*;
Read more

Question & Answer: Which of the following sorting algorithms are (or are not) considered greedy algorithms? quick, insertion, selection, heap and merge. Justify your answers…..

5. Which of the following sorting algorithms are (or are not) considered greedy algorithms? quick, insertion, selection, heap and merge. Justify your answers. (5 marks)

Which of the following sorting algorithms are (or are not) considered greedy algorithms? quick, insertion, selection, heap and merge. Justify your answers.

Expert Answer

Read more

Question & Answer: Given a plane graph represented as an ordered (clockwise) adjacency lists, as presented in class, give a detailed efficient algorithm that lists all r…..

4. Given a plane graph represented as an ordered (clockwise) adjacency lists, as presented in class, give a detailed efficient algorithm that lists all regions of the plane embedding. Here each region is a sequence of vertices, ordered as one traverses the edges of its boundary. See the following (4 marks) examp (CompSci220 format) R1: 0125243 R2: 0 3 1 R3: 13 4 2 1 3 0 2 3 1 5 4 0 1 4 2 3 2 Do analysis on the running-time of your algorithm. Note that all planar graphs have O(n) edges (1 marks)

Given a plane graph represented as an ordered (clockwise) adjacency lists, as presented in class, give a detailed efficient algorithm that lists all regions of the plane embedding. Here each region is a sequence of vertices, ordered as one traverses the edges of its boundary. See the following example. Do analysis on the running-time of your algorithm. Note that all planar graphs have O(n) edges.

Expert Answer

 

A graph that can be drawn on a plane without edges crossing is called planar.

Given that three regions R1,R2,R3 as we have 6 vertices

Read more

Question & Answer: Consider the (non-weighted) Interval Scheduling Problem that was discussed in class. (a) Illustrate the greedy algorithm on the in…..

3. Consider the (non-weighted) Interval Scheduling Problem that was discussed in class. (a) Illustrate the greedy algorithm on the input (5,7), (3,8), (2, 4), (6,8), (6,9), (3,6), (7,8). (3 marks) (b) Explain, in general, how one can enumerate all of the optimal answers. How efficient is your (2 marks) algorithm?

Consider the (non-weighted) Interval Scheduling Problem that was discussed in class. (a) Illustrate the greedy algorithm on the input (5,7), (3,8), (2,4), (6,8), (6,9), (3,6), (7,8). (b) Explain, in general, how one can enumerate all of the optimal answers. How efficient is your algorithm?

Expert Answer

Read more
Still stressed from student homework?
Get quality assistance from academic writers!