Programming Homework Help

CSCI 426 Harvard Week 5 Software Development Testing & Analysis Question

 

CSCI426/CSCI926 Software Testing and Analysis

Lab – Week 5CSCI426/CSCI926 Software Testing and Analysis

Lab – Week 5

Draw the control flow graph for the following code Draw the control flow graph for the following code

Programming Homework Help

simple R studio assignmennt

 

Need give 4 different scripts.

here is the instruction

You can nudge your final grade up by a couple points by becoming a qelp contributor.

Visit the project here: https://github.com/cobriant/qelp

Pick a function from the list that I haven’t yet written a qelp doc about (the checkbox will not be checked). Write a description of the function, its basic usage, explain the arguments it takes, and write an example that shows a number of different ways the function can be used. Look at ?qelp::qplot for an example of each of these.

To make a submission, create an account at github.com. Visit the folder of docs I’ve written here: https://github.com/cobriant/qelp/tree/main/R and click the button that says Add File, and select Create New File. Follow the format for the others I’ve written. When you’re done, hit “Propose new file” and I’ll be prompted to look at what you’ve done and add your new file to my project.

If someone else makes a submission for the same function before you can submit yours, you will not be awarded the extra credit. You can e-mail me when you’ve picked out the functions you’d like to do to make sure no one has done them. Also, if your documentation is sub-par and rushed, full points will not be awarded.

Don’t need to create new account and submit, I will do these parts, only choose FOUR different subjects (do not choose geom_point , can feely choose all rest). And give a R scripts of all four subjects.

Programming Homework Help

CIS 22B De Anza College Fundamentals of Database Systems Project

 

Assignment:

You will extend your lab 1 to work with the whole book information, not just the title. Your program will use the same input file, but this time you will define a structure to receive the title, author and genre. You can use the same method that you learned to strip the book title to get the other parts. Instead of just a vector of strings (title), you will now need a vector of structures. Each element in the vector will have the book’s title, author and genre. Your program needs to be able to sort the vector by title, author or genre.

Detailed specifications:

  • Define a structure with fields to store each part of the book information: title, author and genre. The structure can be defined in the global scope as it is not a variable. A structure is a type.
  • Declare a variable, whose type is the structure, to receive the book info, and also a vector of structures that will store all the books. Remember that variables should not be global.
  • Read the each line of the file the same way you did before, making it a string stream, but now you will need to call getline on the stringstream repeatedly to get each part following the title. After populating the structure variable with the book info, push it into the vector.
  • Design an interface to let the user of your program choose which field they want to see the books sorted by (title, author or genre). Therefore you will need to define three different compare functions to pass to sort. Here are examples of how you would call sort with different compare functions:

sort (books.begin(), books.end(), compareByTitle);

sort (books.begin(), books.end(), compareByAuthor);

sort (books.begin(), books.end(), compareByGenre);

sort will use the function that you provide to sort the data.

This is how function compareByTitle should look like, assuming Book is the name of your structure:

bool compareByTitle(Book book1, Book book2) { return book1.title < book2.title) }

Display the books sorted by the field that the user chooses. You should display ALL fields no matter how the data is sorted.

I expect that you split your program in several functions, instead of having one big main function. Define separate functions to:

  • Read the data from the file and populate the vector. Notice that vectors are not arrays and need to be passed by reference.
  • Have an interface with the user asking which fields should be used for sorting and call sort with the appropriate compare function.
  • Print the book info. Vectors should be passed by reference to avoid unnecessary copying. Pass it as a const reference since it does not need to be changed inside this function.

Documentation:

All labs should have a comment at the beginning of each source code (.cpp and .h files) that looks like this:

/***************************************************************************
Write the description of program here (this is not the lab instructions!)
Date:
Lab Group #
Partners names:
****************************************************************************/

Each function should have a comment above that looks like this:

/***************************************************************************
Describe what the function does
Parameters: explain
Return value: explain or write none
****************************************************************************/

Input:

Use the same file you used on lab 1 to test your lab 2.

Output:

This is how the output should look like if the user chooses to sort by. Here is an example of an output if the user chooses to sort by genre:

Replay, Ken Grimwood, fantasy

One Hundred Years of Solitude, Gabriel Garcia Marquez, fiction

Ashes, Kenzo Kitakana, fiction

The Pillars of the Earth, Ken Follett, historical fiction

Fall of Giants, Ken Follet, historical fiction

Mindset: The New Psychology of Success, Carol Dweck, psychology

The Dark Forest, Liu Cixin, science fiction

Starting out with c++, Tony Gaddis, technical

Fundamentals of Database Systems, Elmarsi & Navathe, technical

The C++ Programming Language, Bjarne Stroustrup, technical

Take a screenshot of the output your program generates and upload it with your source code.

Programming Homework Help

Data Structures class Java Question

 

Hello, this is for my Data Structures class. I will be including a .java file that will be used for the assignment. There is also a folder with files that will be needed for the assignment.

Also including the textbook being used for this class. This is based on Chapter 5.4 – 5.5 if need needed.

Java File: https://www.dropbox.com/s/d01l2lcnbtgj22c/hw8.java…

Folder: https://www.dropbox.com/s/mszjm6o6ed43xnr/algs4.zi…

Programming Homework Help

CISS 110 Rutgers University Newark Java Debugging a Code

 

I’m stuck on a Java question and need an explanation.

/* d31.java

save as db31.java and debug the errors. There are three possibilities.

You can get a burger with fries, a burger without fries, or nothing –

you can’t just get fries. Use compound blocks where necessary.

*/

public class d31

{

public static void main(String[] args)

{

char userschoice;

double bill = 0.0;

System.out.print(“Do you want a burger? “);

System.out.print(“Enter y or n: “);

userschoice = System.in.read();

System.in.read();

if(usersChoice = ‘y’)

bill += 2.59;

System.out.print(“Fries with that burger? “);

System.out.print(“Enter y or n: “);

userschoice = System.in.read();

System.in.read();

if (userschoice = ‘y’)

bill += .89;

System.out.printf(“Bill is %.2fn”, bill);

}

}

Programming Homework Help

Avila University Correlation & Regression Analysis of the Bouvier Co Paper

 

hey,

This is an assignment with two parts I attached here.

The first parts (Correlation and Regression analysis) are problems and solve it in word document

and the second part (Python application) for python programming send it with (Notebook format)

Programming Homework Help

CMPE 320 Montgomery College Autocorrelation on Random Processes Matlab Project Report

 

1INTRODUCTION


This project investigates the autocorrelation of a random signal. You will use the techniques of simulation you have developed in previous projects, plus apply the built-in MATLAB function xcorr. Because this analysis is fairly complicated, I’ve created a detailed skeleton of a MATLAB script to guide you.

1.1 Due Date

1.2 Background

A random process, , is defined as a collection of time functions governed by one or more random variables. Specific random time functions within the collection are called sample functions of the random process. For each instant in time, is itself a random variable which can take on different values at each value of and across all the sample functions . Because the collection of all of the values, across the collection of sample functions represent the values of a random variable, it is meaningful to speak of the pdf of the random variable at a specific instant in time. Mathematically, this pdf may change at every instant in time. As with random variables, it is meaningful to speak of the joint pdf, , and, in fact of this joint pdf for any collection of times, ,namely, . A random process for whom joint probability density remains the same no matter what the value of , and no matter what the specific choice of the times, is called strict sense stationary. Knowing this full joint pdf is difficult; we usually assume that we know only the second order joint pdf, that is, for any valid choice of With this knowledge, we can define a process as Wide Sense Stationary (WSS) if the following two conditions hold. (1.1) X(t) X(t 0 ) t 0 x(t 0 ) x1(t 0 ), x2 (t 0 { ),… } x1(t), x2 { (t),…} f X (t 0 ) (x(t 0 )) f X (t 0 ) X (t 1 ) x(t 0 ), x(t 1 ( )) t 0 ,t 1,t 2 ,…t { N } f X (t 0 ) X (t 1 )…X (t N ) x(t 0 ), x(t 1),…, x(tN ( )) N f X (t 1 ) X (t 2 ) x(t 1), x(t 2 ( )) t 1 and t 2. E X(t 0 ⎡ ) ⎣ ⎤ ⎦ = C (a constant) for all t 0 RXX (t 1,t 2 ) = RXX (t 1,t 1 +τ ) = RXX (t 1 +τ ,t 2 ) = E X(t 1)X(t 2 ⎡ ) ⎣ ⎤ ⎦ = RXX (τ ) 2 The function is called the autocorrelation function. The second condition of equation (1.1), states that the autocorrelation function of a WSS process is a function of only the time difference and not of the specific times . This project provides some experience with the autocorrelation function. It is important to note that the expected value shown in equation (1.1) is not a time average. Remembering that at every instant the random process is a random variable with an associated pdf the expected value in equation (1.1) is given by (1.2) It is not a time integral at all, but a true expected value evaluated at one instant in time. Equation (1.1) says that for a WSS process, this expected value is a constant. Similarly, given the joint pdf and the two time instants, , the second order expected value (1.3) This, too, is not a time integral, but a second order statistical expected value. Finally, a very important special case of random processes do have the property that a very long term time average of the random process gives the same numeric value as the statistical expected value. In this case the time average, which we write is equal to the expected value, . Such random processes are called ergodic. By the nature of the random number generators used in MATLAB, random sequences generated in MATLAB (and most other programs, too) possess this property, unless they are specifically modified by the user. All of the examples we have used in previous projects are ergodic. Given the assumption of ergodicity, MATLAB uses a time averaging method to estimate the statistical autocorrelation process. The MATLAB function that does this is xcorr. Because the sequences are not (and cannot be) infinitely long, however, use of xcorr is only an approximation, and produces an autocorrelation waveform, , that is, itself a random process. Let’s see how this works! 2 PROJECT TASKS Perform the following tasks, document your results and submit them in written form in accordance with the instructions in Section 3, below. You may use this document as a format. RXX (t 1,t 2 ) = E X(t 1)X(t 2 ⎡ ) ⎣ ⎤ ⎦ t 2 − t 1 t 1 and t 2 t 0 X(t 0 ) E[X(t 0 )] = x(t 0 ) f X (t 0 ) (x(t 0 ))dx(t 0 ) −∞ ∞ ∫ t 1 and t 2 RXX (t 1,t 2 ) = x(t 1)x(t 2 ) f X (t 1 ) X (t 2 ) (x(t 1), x(t 2 ))dx(t 1)dx(t 2 ) = RXX (t 2 − t 1)

Programming Homework Help

CMPE 320 Montgomery College Rockville Autocorrelation in Random Processes Report

 

1INTRODUCTION


This project investigates the autocorrelation of a random signal. You will use the techniques of simulation you have developed in previous projects, plus apply the built-in MATLAB function xcorr. Because this analysis is fairly complicated, I’ve created a detailed skeleton of a MATLAB script to guide you.

1.1 Due Date

1.2 Background

A random process, , is defined as a collection of time functions governed by one or more random variables. Specific random time functions within the collection are called sample functions of the random process. For each instant in time, is itself a random variable which can take on different values at each value of and across all the sample functions . Because the collection of all of the values, across the collection of sample functions represent the values of a random variable, it is meaningful to speak of the pdf of the random variable at a specific instant in time. Mathematically, this pdf may change at every instant in time. As with random variables, it is meaningful to speak of the joint pdf, , and, in fact of this joint pdf for any collection of times, ,namely, . A random process for whom joint probability density remains the same no matter what the value of , and no matter what the specific choice of the times, is called strict sense stationary. Knowing this full joint pdf is difficult; we usually assume that we know only the second order joint pdf, that is, for any valid choice of With this knowledge, we can define a process as Wide Sense Stationary (WSS) if the following two conditions hold. (1.1) X(t) X(t 0 ) t 0 x(t 0 ) x1(t 0 ), x2 (t 0 { ),… } x1(t), x2 { (t),…} f X (t 0 ) (x(t 0 )) f X (t 0 ) X (t 1 ) x(t 0 ), x(t 1 ( )) t 0 ,t 1,t 2 ,…t { N } f X (t 0 ) X (t 1 )…X (t N ) x(t 0 ), x(t 1),…, x(tN ( )) N f X (t 1 ) X (t 2 ) x(t 1), x(t 2 ( )) t 1 and t 2. E X(t 0 ⎡ ) ⎣ ⎤ ⎦ = C (a constant) for all t 0 RXX (t 1,t 2 ) = RXX (t 1,t 1 +τ ) = RXX (t 1 +τ ,t 2 ) = E X(t 1)X(t 2 ⎡ ) ⎣ ⎤ ⎦ = RXX (τ ) 2 The function is called the autocorrelation function. The second condition of equation (1.1), states that the autocorrelation function of a WSS process is a function of only the time difference and not of the specific times . This project provides some experience with the autocorrelation function. It is important to note that the expected value shown in equation (1.1) is not a time average. Remembering that at every instant the random process is a random variable with an associated pdf the expected value in equation (1.1) is given by (1.2) It is not a time integral at all, but a true expected value evaluated at one instant in time. Equation (1.1) says that for a WSS process, this expected value is a constant. Similarly, given the joint pdf and the two time instants, , the second order expected value (1.3) This, too, is not a time integral, but a second order statistical expected value. Finally, a very important special case of random processes do have the property that a very long term time average of the random process gives the same numeric value as the statistical expected value. In this case the time average, which we write is equal to the expected value, . Such random processes are called ergodic. By the nature of the random number generators used in MATLAB, random sequences generated in MATLAB (and most other programs, too) possess this property, unless they are specifically modified by the user. All of the examples we have used in previous projects are ergodic. Given the assumption of ergodicity, MATLAB uses a time averaging method to estimate the statistical autocorrelation process. The MATLAB function that does this is xcorr. Because the sequences are not (and cannot be) infinitely long, however, use of xcorr is only an approximation, and produces an autocorrelation waveform, , that is, itself a random process. Let’s see how this works! 2 PROJECT TASKS Perform the following tasks, document your results and submit them in written form in accordance with the instructions in Section 3, below. You may use this document as a format. RXX (t 1,t 2 ) = E X(t 1)X(t 2 ⎡ ) ⎣ ⎤ ⎦ t 2 − t 1 t 1 and t 2 t 0 X(t 0 ) E[X(t 0 )] = x(t 0 ) f X (t 0 ) (x(t 0 ))dx(t 0 ) −∞ ∞ ∫ t 1 and t 2 RXX (t 1,t 2 ) = x(t 1)x(t 2 ) f X (t 1 ) X (t 2 ) (x(t 1), x(t 2 ))dx(t 1)dx(t 2 ) = RXX (t 2 − t 1)