Description
I have done the code but it needs to be edited. The method is depth first search in java and I want to change the code that a user can enter a vertex to start, not only from A.
Unformatted Attachment Preview
import java.io.*;
import java.util.*;
public class DFS {
public static
void DFS_search_inner(int[][] adjMatrix,
int[] visited, int index, int num) {
//if have already visited
if(visited[index]==1)
{
return;
}
else
{
visited[index]=1;
//use for loop to go through all the vertexes
for(int i=0; i
Purchase answer to see full attachment
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Explanation & Answer
Review
Review
Anonymous
Great study resource, helped me a lot.
Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Most Popular Content
University of Central Florida Java Bank Multiple Threads Programming
please write a simple java program that will simulate the deposits and withdrawals made to a fictitious bank account.
University of Central Florida Java Bank Multiple Threads Programming
please write a simple java program that will simulate the deposits and withdrawals made to a fictitious bank account.
Compiler design
This project requires modification to the bison input file, so that it defines the additional
semantic checks necessary t ...
Compiler design
This project requires modification to the bison input file, so that it defines the additional
semantic checks necessary to produce these errors and addition of functions to the library of type
checking functions already provided in types.cc. You must also make some modifications to
the functions provided. You need to add a check to the checkAssignment function for
mismatched types in the case that Boolean and numeric types are mixed. You need to also add
code to the checkArithmetic function to coerce integers to reals when the types are mixed and
the error message must be modified to indicate that numeric rather than only integer types are
permitted.
The provided code includes a template class Symbols that defines the symbol table. It already
includes a check for undeclared identifiers. You need to add a check for duplicate identifiers.
Like the lexical and syntax errors, the compiler should display the semantic errors in the
compilation listing, after the line in which they occur. An example of compilation listing output
containing semantic errors is shown below:
1 -- Test of Multiple Semantic Errors
2
3 function test a: integer returns integer;
4 b: integer is
5 if a + 5 then
6 2;
7 else
8 5;
9 endif;
Semantic Error, If Expression Must Be Boolean
10 c: real is 9.8 - 2 + 8;
11 d: boolean is 7 = f;
Semantic Error, Undeclared f
12 begin
13 case b is
14 when 1 => 4.5 + c;
15 when 2 => b;
Semantic Error, Case Types Mismatch
16 others => c;
17 endcase;
18 end;
Lexical Errors 0
Syntax Errors 0
Semantic Errors 3
You are to submit two files.
1. The first is a .zip file that contains all the source code for the project. The .zip file
should contain the flex input file, which should be a .l file, the bison file, which should
be a .y file, all .cc and .h files and a makefile that builds the project.
2. The second is a Word document (PDF or RTF is also acceptable) that contains the
documentation for the project, which should include the following:
a. A discussion of how you approached the project
b. A test plan that includes test cases that you have created indicating what aspects
of the program each one is testing and a screen shot of your compiler run on that
test case
c. A discussion of lessons learned from the project and any improvements that could
be made
Entity-Relationship Model
you will need both MySQL Workbench and a local installation of MySQL Server. Both are available for free download at www.m ...
Entity-Relationship Model
you will need both MySQL Workbench and a local installation of MySQL Server. Both are available for free download at www.mysql.com under the Downloads (GA) tab.ScenarioIn W2 Assignment 2, you used MySQL Workbench to create an Entity-Relationship (ER) diagram for ABC Manufacturing's customer relationship management (CRM) system and in W3 Assignment 2 you created the database. The company has received significant value for your work and they have asked you take on a new project. ABC Manufacturing would like you to create an inventory management system.TasksYou will need to start by creating an ER model, including both Entity Classes and attributes. This is to be done in MySQL Workbench.Then, using both MySQL Workbench and MySQL Server, create a schema called ABC_YourLastName. In this schema, create all the necessary tables, columns, and relationships to meet the following requirements:Track raw materials with various options including color and size.Set minimum inventory levels that will trigger the ordering of replacement material.Raw materials should be able to be assigned to multiple finished goods.Material orders will need to be tracked for when orders are placed, received, and used so that trending data can be used.At times a raw material will be replaced with a new product. The new product will need to be tracked to the product it replaced.To submit your database to the Submissions Area, you must export the schema to a file. To perform an export, complete the following steps from the MySQL Workbench Home tab:Click Manage Import/Export under the Server Administration column.Make sure Data Export is highlighted on the Task and Object Browser.Check the box next to ABC_YourLastName in the left dialog box.Under Options, select the Export to Self-Contained File radio button and note the file path.Change the name of the file from the default to SU_ITS2110_W5_A2_LastName_FirstInitial.sql.Click Start Export.When the export is complete, you will need to upload the file into the Submissions Area with the rest of the assignment.Lastly, you will need to populate the tables using SQL scripts. You will also need to produce the SQL scripts to provide the raw material reorder data. Save your SQL scripts in a Microsoft Word document as you will need to submit them.In addition, in a 2- to 3-page Microsoft Word document, create a report that includes the following information:Describe your database.Explain what tables, columns, keys, and so on will be seen in the schema.Explain how you created the database and how your work applies to the requirements.Include information that a DBA may need to know about your design.Include screenshots of your work.Cite any sources in APA format.
12 pages
20200719195030tm111 The Final 2019 2020 Third 01 05 2020 Ksa
As per AOU rules and regulations, all students are required to submit their own THE-Final work and avoid plagiarism. The A ...
20200719195030tm111 The Final 2019 2020 Third 01 05 2020 Ksa
As per AOU rules and regulations, all students are required to submit their own THE-Final work and avoid plagiarism. The AOU has implemented ...
ALY 6015 Northeastern University Hypothesis Tests in R
Summary:Complete the following problems using R and/or MS Excel. Be sure to show your work and include the hypothesis test ...
ALY 6015 Northeastern University Hypothesis Tests in R
Summary:Complete the following problems using R and/or MS Excel. Be sure to show your work and include the hypothesis tests, the critical values, the computed test values, and the resulting decisions where applicable.Perform the following steps.State the hypotheses and identify the claim.Find the critical value.Compute the test value.Make the decision.Summarize the results.Use the traditional method of hypothesis testing unless otherwise specified. Assume all assumptions are met.1.Blood Types:A medical researcher wishes to see if hospital patients in a large hospital have the same blood type distribution as those in the general population. The distribution for the general population is as follows: type A, 20%; type B, 28%; type O, 36%; and type AB = 16%. He selects a random sample of 50 patients and finds the following: 12 have type A blood, 8 have type B, 24 have type O, and 6 have type AB blood.At α = 0.10, can it be concluded that the distribution is the same as that of the general population?2.one time performance by airlines According to the Bureau of Transportation Statistics, on-time performance by the airlines is described as follows:Action% of TimeOn time70.8National Aviation System delay8.2Aircraft arriving late9.0Other (because of weather and other conditions)12.0Records of 200 randomly selected flights for a major airline company showed that 125 planes were on time; 40 were delayed because of weather, 10 because of a National Aviation System delay, and the rest because of arriving late. At α = 0.05, do these results differ from the government’s statistics?3.his table lists the numbers of officers and enlisted personnel for women in the military. At α = 0.05, is there sufficient evidence to conclude that a relationship exists between rank and branch of the Armed Forces?ActionOfficersEnlistedArmy10,79162,491Navy7,81642,750Marine Corps9329,525Air Force11,81954,3444.Are movie admissions related to ethnicity? A 2014 study indicated the following numbers of admissions (in thousands) for two different years. At the 0.05 level of significance, can it be concluded that movie attendance by year was dependent upon ethnicity?CaucasianHispanicAfrican AmericanOther201372433517410720143702921521405.The amount of sodium (in milligrams) in one serving for a random sample of three different kinds of foods is listed. At the 0.05 level of significance, is there sufficient evidence to conclude that a difference in mean sodium amounts exists among condiments, cereals, and desserts?CondimentsCerealsDesserts27026010013022018023029025018029025080200300703203602001403001606.The sales in millions of dollars for a year of a sample of leading companies are shown. At α = 0.01, is there a significant difference in the means?CerealChocolate CandyCoffee5783112613201061852641093022491256892371737.The expenditures (in dollars) per pupil for states in three sections of the country are listed. Using α = 0.05, can you conclude that there is a difference in means?undefinedEastern thirdMiddle thirdWestern third49466149528259537451860562026000652872436479691161138.A gardening company is testing new ways to improve plant growth. Twelve plants are randomly selected and exposed to a combination of two factors, a “Grow-light” in two different strengths and a plant food supplement with different mineral supplements. After a number of days, the plants are measured for growth, and the results (in inches) are put into the appropriate boxes.Grow-light 1Grow-light 2Plant food A9.2, 9.4, 8.98.5, 9.2, 8.9Plant food B7.1, 7.2, 8.55.5, 5.8, 7.6Can an interaction between the two factors be concluded? Is there a difference in mean growth with respect to light? With respect to plant food? Use α = 0.05.On Your OwnUse R to complete the following steps. Be sure to include all code in an appendix at the end of your submission. Assume the expected frequencies are equal and α = 0.05.Use the following data sets: baseball.csv crop_data.csvDownload the file ‘baseball.csv’ from above and import the file into R.Perform EDA on the imported data set. Write a paragraph or two to describe the data set using descriptive statistics and plots. Are there any trends or anything of interest to discuss?Assuming the expected frequencies are equal, perform a Chi-Square Goodness-of-Fit test to determine if there is a difference in the number of wins by decade. Be sure to include the following:State the hypotheses and identify the claim.Find the critical value (α = 0.05) (From table in the book).Compute the test value.Make the decision. Clearly state if the null hypothesis should or should not be rejected and why.Does comparing the critical value with the test value provide the same result as comparing the p-value from R with the significance level?Here is some code to get you started. Be sure to import the dplyr and tidyverse packages.# Extract decade from year bb$Decade <- bb$Year - (bb$Year %% 10)# Create a wins table by summing the wins by decade wins <- bb %>% group_by(Decade) %>% summarize(wins = sum(W)) %>% as.tibble()Download the file ‘crop_data.csv’ from above and import the file into R.Perform a Two-way ANOVA test using yield as the dependent variable and fertilizer and density as the independent variables. Explain the results of the test. Is there reason to believe that fertilizer and density have an impact on yield?** Be sure to convert the variables density, fertilizer and block to R factors.**Include a null and alternate hypothesis for both factors and the interaction.
Similar Content
webpage work
There are many online HTML and CSS resources. There are several that help you generate code for web tables. Use your own r...
Barry University Java Programming Exam Practice
write the codes in a basic way. ...
Carnegie Mellon University Python Summation Notation Exam Practice
assignment at a given provided time. The link will be provided during the course of the assignment ...
i have homwork for computer method
Problem Solving Homework #10 – Due 12/6/2019
Everyone – Solve 1 and 2
For each example, describe your solution methods...
provide users the functionality to draw connected line segments polylines WebGL
Objectives:Rubberband lines and GUI.Description:For this assignment you will provide users the functionality to draw conne...
MISY 2312 PMU 2 Computer Programming and Python Questions
Question 3
The ministry of education is trying to encourage a multicultural environment in the school system. To do so,
ea...
Wordpress Website For Elementary Class
My name is Mrs Rosemary McGee. I am a 35-year old qualified elementary class teacher with 7 years working experience. The ...
Part 2 Descriptive Statistics
Descriptive statistics is an essential and crucial aspect of data analysis that explores hidden information about the data...
Freeelectronics Update
You must submit two separate copies (one Word file and one PDF file)using the Assignment Template on Blackboard via the al...
Related Tags
Book Guides
The Curious Case of the Dog in the Night Time
by Mark Haddon
Othello
by Wiliam Shakespeare
Faust
by Johann Wolfgang von Goethe
The Age of Innocence
by Edith Wharton
The Prince
by Niccolò Machiavelli
2001 A Space Odyssey
by Arthur Clarke
The Old Man and the Sea
by Ernest Hemmingway
Twelve Years A Slave
by Solomon Northrup
Becoming
by Michelle Obama
Get 24/7
Homework help
Our tutors provide high quality explanations & answers.
Post question
Most Popular Content
University of Central Florida Java Bank Multiple Threads Programming
please write a simple java program that will simulate the deposits and withdrawals made to a fictitious bank account.
University of Central Florida Java Bank Multiple Threads Programming
please write a simple java program that will simulate the deposits and withdrawals made to a fictitious bank account.
Compiler design
This project requires modification to the bison input file, so that it defines the additional
semantic checks necessary t ...
Compiler design
This project requires modification to the bison input file, so that it defines the additional
semantic checks necessary to produce these errors and addition of functions to the library of type
checking functions already provided in types.cc. You must also make some modifications to
the functions provided. You need to add a check to the checkAssignment function for
mismatched types in the case that Boolean and numeric types are mixed. You need to also add
code to the checkArithmetic function to coerce integers to reals when the types are mixed and
the error message must be modified to indicate that numeric rather than only integer types are
permitted.
The provided code includes a template class Symbols that defines the symbol table. It already
includes a check for undeclared identifiers. You need to add a check for duplicate identifiers.
Like the lexical and syntax errors, the compiler should display the semantic errors in the
compilation listing, after the line in which they occur. An example of compilation listing output
containing semantic errors is shown below:
1 -- Test of Multiple Semantic Errors
2
3 function test a: integer returns integer;
4 b: integer is
5 if a + 5 then
6 2;
7 else
8 5;
9 endif;
Semantic Error, If Expression Must Be Boolean
10 c: real is 9.8 - 2 + 8;
11 d: boolean is 7 = f;
Semantic Error, Undeclared f
12 begin
13 case b is
14 when 1 => 4.5 + c;
15 when 2 => b;
Semantic Error, Case Types Mismatch
16 others => c;
17 endcase;
18 end;
Lexical Errors 0
Syntax Errors 0
Semantic Errors 3
You are to submit two files.
1. The first is a .zip file that contains all the source code for the project. The .zip file
should contain the flex input file, which should be a .l file, the bison file, which should
be a .y file, all .cc and .h files and a makefile that builds the project.
2. The second is a Word document (PDF or RTF is also acceptable) that contains the
documentation for the project, which should include the following:
a. A discussion of how you approached the project
b. A test plan that includes test cases that you have created indicating what aspects
of the program each one is testing and a screen shot of your compiler run on that
test case
c. A discussion of lessons learned from the project and any improvements that could
be made
Entity-Relationship Model
you will need both MySQL Workbench and a local installation of MySQL Server. Both are available for free download at www.m ...
Entity-Relationship Model
you will need both MySQL Workbench and a local installation of MySQL Server. Both are available for free download at www.mysql.com under the Downloads (GA) tab.ScenarioIn W2 Assignment 2, you used MySQL Workbench to create an Entity-Relationship (ER) diagram for ABC Manufacturing's customer relationship management (CRM) system and in W3 Assignment 2 you created the database. The company has received significant value for your work and they have asked you take on a new project. ABC Manufacturing would like you to create an inventory management system.TasksYou will need to start by creating an ER model, including both Entity Classes and attributes. This is to be done in MySQL Workbench.Then, using both MySQL Workbench and MySQL Server, create a schema called ABC_YourLastName. In this schema, create all the necessary tables, columns, and relationships to meet the following requirements:Track raw materials with various options including color and size.Set minimum inventory levels that will trigger the ordering of replacement material.Raw materials should be able to be assigned to multiple finished goods.Material orders will need to be tracked for when orders are placed, received, and used so that trending data can be used.At times a raw material will be replaced with a new product. The new product will need to be tracked to the product it replaced.To submit your database to the Submissions Area, you must export the schema to a file. To perform an export, complete the following steps from the MySQL Workbench Home tab:Click Manage Import/Export under the Server Administration column.Make sure Data Export is highlighted on the Task and Object Browser.Check the box next to ABC_YourLastName in the left dialog box.Under Options, select the Export to Self-Contained File radio button and note the file path.Change the name of the file from the default to SU_ITS2110_W5_A2_LastName_FirstInitial.sql.Click Start Export.When the export is complete, you will need to upload the file into the Submissions Area with the rest of the assignment.Lastly, you will need to populate the tables using SQL scripts. You will also need to produce the SQL scripts to provide the raw material reorder data. Save your SQL scripts in a Microsoft Word document as you will need to submit them.In addition, in a 2- to 3-page Microsoft Word document, create a report that includes the following information:Describe your database.Explain what tables, columns, keys, and so on will be seen in the schema.Explain how you created the database and how your work applies to the requirements.Include information that a DBA may need to know about your design.Include screenshots of your work.Cite any sources in APA format.
12 pages
20200719195030tm111 The Final 2019 2020 Third 01 05 2020 Ksa
As per AOU rules and regulations, all students are required to submit their own THE-Final work and avoid plagiarism. The A ...
20200719195030tm111 The Final 2019 2020 Third 01 05 2020 Ksa
As per AOU rules and regulations, all students are required to submit their own THE-Final work and avoid plagiarism. The AOU has implemented ...
ALY 6015 Northeastern University Hypothesis Tests in R
Summary:Complete the following problems using R and/or MS Excel. Be sure to show your work and include the hypothesis test ...
ALY 6015 Northeastern University Hypothesis Tests in R
Summary:Complete the following problems using R and/or MS Excel. Be sure to show your work and include the hypothesis tests, the critical values, the computed test values, and the resulting decisions where applicable.Perform the following steps.State the hypotheses and identify the claim.Find the critical value.Compute the test value.Make the decision.Summarize the results.Use the traditional method of hypothesis testing unless otherwise specified. Assume all assumptions are met.1.Blood Types:A medical researcher wishes to see if hospital patients in a large hospital have the same blood type distribution as those in the general population. The distribution for the general population is as follows: type A, 20%; type B, 28%; type O, 36%; and type AB = 16%. He selects a random sample of 50 patients and finds the following: 12 have type A blood, 8 have type B, 24 have type O, and 6 have type AB blood.At α = 0.10, can it be concluded that the distribution is the same as that of the general population?2.one time performance by airlines According to the Bureau of Transportation Statistics, on-time performance by the airlines is described as follows:Action% of TimeOn time70.8National Aviation System delay8.2Aircraft arriving late9.0Other (because of weather and other conditions)12.0Records of 200 randomly selected flights for a major airline company showed that 125 planes were on time; 40 were delayed because of weather, 10 because of a National Aviation System delay, and the rest because of arriving late. At α = 0.05, do these results differ from the government’s statistics?3.his table lists the numbers of officers and enlisted personnel for women in the military. At α = 0.05, is there sufficient evidence to conclude that a relationship exists between rank and branch of the Armed Forces?ActionOfficersEnlistedArmy10,79162,491Navy7,81642,750Marine Corps9329,525Air Force11,81954,3444.Are movie admissions related to ethnicity? A 2014 study indicated the following numbers of admissions (in thousands) for two different years. At the 0.05 level of significance, can it be concluded that movie attendance by year was dependent upon ethnicity?CaucasianHispanicAfrican AmericanOther201372433517410720143702921521405.The amount of sodium (in milligrams) in one serving for a random sample of three different kinds of foods is listed. At the 0.05 level of significance, is there sufficient evidence to conclude that a difference in mean sodium amounts exists among condiments, cereals, and desserts?CondimentsCerealsDesserts27026010013022018023029025018029025080200300703203602001403001606.The sales in millions of dollars for a year of a sample of leading companies are shown. At α = 0.01, is there a significant difference in the means?CerealChocolate CandyCoffee5783112613201061852641093022491256892371737.The expenditures (in dollars) per pupil for states in three sections of the country are listed. Using α = 0.05, can you conclude that there is a difference in means?undefinedEastern thirdMiddle thirdWestern third49466149528259537451860562026000652872436479691161138.A gardening company is testing new ways to improve plant growth. Twelve plants are randomly selected and exposed to a combination of two factors, a “Grow-light” in two different strengths and a plant food supplement with different mineral supplements. After a number of days, the plants are measured for growth, and the results (in inches) are put into the appropriate boxes.Grow-light 1Grow-light 2Plant food A9.2, 9.4, 8.98.5, 9.2, 8.9Plant food B7.1, 7.2, 8.55.5, 5.8, 7.6Can an interaction between the two factors be concluded? Is there a difference in mean growth with respect to light? With respect to plant food? Use α = 0.05.On Your OwnUse R to complete the following steps. Be sure to include all code in an appendix at the end of your submission. Assume the expected frequencies are equal and α = 0.05.Use the following data sets: baseball.csv crop_data.csvDownload the file ‘baseball.csv’ from above and import the file into R.Perform EDA on the imported data set. Write a paragraph or two to describe the data set using descriptive statistics and plots. Are there any trends or anything of interest to discuss?Assuming the expected frequencies are equal, perform a Chi-Square Goodness-of-Fit test to determine if there is a difference in the number of wins by decade. Be sure to include the following:State the hypotheses and identify the claim.Find the critical value (α = 0.05) (From table in the book).Compute the test value.Make the decision. Clearly state if the null hypothesis should or should not be rejected and why.Does comparing the critical value with the test value provide the same result as comparing the p-value from R with the significance level?Here is some code to get you started. Be sure to import the dplyr and tidyverse packages.# Extract decade from year bb$Decade <- bb$Year - (bb$Year %% 10)# Create a wins table by summing the wins by decade wins <- bb %>% group_by(Decade) %>% summarize(wins = sum(W)) %>% as.tibble()Download the file ‘crop_data.csv’ from above and import the file into R.Perform a Two-way ANOVA test using yield as the dependent variable and fertilizer and density as the independent variables. Explain the results of the test. Is there reason to believe that fertilizer and density have an impact on yield?** Be sure to convert the variables density, fertilizer and block to R factors.**Include a null and alternate hypothesis for both factors and the interaction.
Earn money selling
your Study Documents