Programming Homework Help

CISS 202 LC The Foreign Key Relationships Entity Framework Discussion

 

I’m working on a .NET exercise and need support.

As learned in CISS 202, in entity relationship diagram (ERD), there is a foreign key when two relations are related. For example, if an instructor can teach many courses while a course can be taught by exactly one instructor, there will be a foreign key in the course table. You show the foreign key relationship by adding the instructor ID as a field in the Course entity. How does this foreign key relationship show in entity framework? In other words, do we use foreign keys in Entity Framework? Defend your answer with specific examples.

Programming Homework Help

CUMS How Insurance Companies Use Text Mining to Reduce Fraud Discussion

 

Discussion 1: Write at least 500 words discussing how insurance companies use text mining to reduce fraud.

Discussion 2: Write at least 500 words discussing the benefits of using R with Hadoop.

Use 3 three sources for EACH DISCUSSION. Include at least 3 quotes from your sources enclosed in quotation marks and cited in-line by reference to your reference list. Example: “words you copied” (citation) These quotes should be one full sentence not altered or paraphrased. Cite your sources using APA format. Use the quotes in your paragraphs.

Write in essay format, not in bulleted, numbered, or another list format. DO NOT CLUB THE DISCUSSIONS, make sure they both are in separate pages.

It is important that you use your own words, that you cite your sources, do not use spinbot or other word replacement software. Proofread your work or have it edited. Find something interesting and/or relevant to your work to write about. Please do not submit attachments unless requested.

Programming Homework Help

UP Profound Transformations Project Risk Management Case Study

 

Resources: 

  • Baltzan, P. (2016). Business-driven information systems. New York, NY: McGraw Hill Education.{from the internet}
  • It is recommended to search the Internet for a Project Risk Management Plan template

Scenario: You are an entrepreneur in the process of researching a business development idea. As you create a high-level Information Technology (IT) strategy for your new enterprise, it is important to address risks to IT. A Project Risk Management Plan will guide the process of identifying enterprise risks and the appropriate steps to mitigate and manage the risks. The Data Collection Plan is intended to describe a high-level process for applying enterprise resources in identifying, analyzing, and mitigating IT risks. The Risk Management Plan is a working document, which is expected to change over time as new project details emerge. 

Create a high-level Project Risk Management Plan for your project in a minimum of 1,050 words which includes the following information: 

  • A description of the enterprise IT risks
  • An assessment of the enterprise exposure to each risk
  • A summary of the highest priority risks
  • High-level procedures to mitigate and manage the most likely risks
  • High-level procedures to address business resumption and disaster recovery

Programming Homework Help

Iglobal University Brute Force Sorting Python Programming Language Practice

 

Q.1) Assignment – Sorting Algorithm

When we (humans) look at a set of objects, we tend towards brute force sorting and search.

Find a C++, Python or Java the performs Brute Force sorting. What is the Big O of this algorithm?

** State your source. 

Q.2) When we (humans) look at a set of objects, we tend towards brute force sorting and search. What is brute force? Can an algorithm be written to perform brute force sorting? Give an example.

 

Programming Homework Help

CSC 413 San Francisco State University Software Development The Interpreter Project

 

I have a program to write called the interpreter. i already have a starter code. I need someone to finish the assignment. I’ll upload the folder later since it is not letting me do it. it is due Friday night so please.

Programming Homework Help

OCC Design Principles and Patterns in Software Development Research Report

 

I’m working on a software development project and need an explanation to help me learn.

  • Research Presentation: • Max 10 slides
  • Research Report
    • Writing requirement 3-4 pages
    • At least 2 external references
      • (Conference paper, articles, journals, books)
  • Writing Template: use the file that i provided
  • Some resources to find research articles and books:

Programming Homework Help

MCDF Reverse Engineering and System Vulnerabilities Problem

 

Part I

Scenario: Novice hackers are trying to write Python code with a malicious code segment injected to attack.

Step 1: Write a simple Python code. For example, a code is shown on slide 6.

Step 2: Contribute to add malicious code. The code should be setting up your local host web server. A sample code is on slides 17-18.

Step 3: Compile a Python to be executable
$python -m py_compile <python file>

Step 4: Assume that your .pyc file is distributed, meaning that it infects others. Run the file and see if index.html is generated.

Step 5: Run the byproduct file index.html

Step 6: Uncompile an executable to Python source code as explained on slide 11.
$uncompyle6 <executable file>

Programming Homework Help

California State University Bakersfield Java Question

 

Modify the Book’s Arraylist class to include the following methods:
1) Switch – switch the first and last elements of the list – so a list of A,B,C,D,E becomes E,B,C,D,A.
2) Swap – receives 2 unequal indexes and switches them so if the list is A,B,C,D,E then swap(2,5) gives a list of A,E,C,D,B.
The workgroup leaders submits just code of the two new methods. You can copy the code into any text file.

Programming Homework Help

UIUC C Code Depth First Programming Paper

 

I will send all the instructions and required file once the question is accepted

This needs to be done within 15 hours


Depth First Search

This assignment uses Depth first search to find the solution to a maze.

There is a lot of background reading in this README, covering enumerations, 2D arrays, and depth first search. Please read the README fully to make sure you understand the concepts used in this homework.

Learning Goals

You will learn:

  • Enumerations and complex data type
  • 2D arrays
  • More recursion
  • Depth first search

Background

Enumerations

An enumeration data type specifies a set of constant (integer) values that are all distinct. You can either set the constant values yourself:

<code>typedef enum Month {
  JANUARY = 1,
  FEBRUARY = 2,
  MARCH = 3,
  APRIL = 4,
  MAY = 5,
  JUNE = 6,
  JULY = 7,
  AUGUST = 8,
  SEPTEMBER = 9,
  OCTOBER = 10,
  NOVEMBER = 11,
  DECEMBER = 12
} Month;
</code>

Or you can let the compiler choose the values for you:

<code>typedef enum Day {
  SUNDAY,
  MONDAY,
  TUESAY,
  WEDNESDAY,
  THURSDAY,
  FRIDAY,
  SATURDAY
} Day;
</code>

(Note that by convention we make the constants in the enumeration ALL CAPS)

You can then use these values as constants throughout your program. If you define a variable as having an enumeration type, you’re saying that you want its values to be restricted to those constants:

Month birthmonth = AUGUST;

Enumerations are a convenient way of defining a set of constants that are related to each other. This will let us use specific constants throughout our program without having to change all of them if we decide to change the values of the constants.

In this assignment, we are using two enumerations. The first defines the “types” of maze squares: a wall, an empty space, the starting point, and the ending point:

<code>typedef enum SquareType {
    WALL = '#',
    SPACE = '.',
    START = 's',
    END = 'e'
} SquareType;
</code>

(Note that we’re taking advantage of the fact that C treats characters as integers of the appropriate ASCII value).

Throughout your code, when you want to see whether a particular value is a wall, you should test if it is equal to WALL, not #. That way, if we later want to change what walls look like in our maze, it will be easy.

The second enumeration defines the possible directions you can move in your path:

<code>typedef enum PathType {
    NORTH = 'n',
    SOUTH = 's',
    EAST = 'e',
    WEST = 'w'
} PathType;
</code>

Complex Structures

Up until now, we have mostly dealt with structures whose fields are simple data types or arrays. But we can also have the fields of a structure be another type like a structure or an enumeration. Consider the types we will use to define our maze (in maze.h):

<code>typedef struct MazeSquare {
    SquareType type;
    bool visited;
} MazeSquare;
</code>

This is a structure that represents a single square in the maze. It has a particular type (using the enumeration type from above), and a flag that lets us know whether we’ve visited this square before or not (useful for checking if your path has loops).

<code>typedef struct MazePos {
    int xpos;
    int ypos;
} MazePos;
</code>

This is a simple structure that captures the location of a particular square in a maze.

<code>typedef struct Maze {
    MazeSquare * * maze; //2D array holding maze
    int width; //Number of columns in maze
    int height; //Number of rows in maze
    MazePos start; //Location of 's'
    MazePos end; //Location of 'e'
} Maze;
</code>

This structure represents an entire maze. It has a width and height, it uses the MazePos structure to capture the starting position in the maze and the ending position in the maze, and it uses a 2D Array of MazeSquares to represent the maze grid itself.

2D Arrays

What are two-dimensional arrays? If you know how many rows and columns you want your array to have, you can define a 2D array easily:

<code>float matrix[10][20]; //a 10x20 matrix
</code>

But what if you don’t know how many rows and columns you need? We’ll have to use dynamic memory allocation, just like we did when we needed arrays of unknown size.

To allocate a 2D array, we will build an array of arrays. We will have an array (representing the rows of the 2D array) where each element of the array is another array. Allocating 2D arrays is tricky, since we don’t know how many rows and columns we need. We have to do it in two steps.

First, we allocate the array of rows. Because each entry needs to be an array of floats itself, the type of this array is a pointer to a pointer to a float:

<code>float * * matrix = malloc(nrows * sizeof(float *));
</code>

This creates an array of nrows pointers to floats. Second, for each of those pointers we allocate an array of floats:

<code>for (int i = 0; i < nrows; i++) {
  matrix[i] = malloc(ncols * sizeof(float));
}
</code>

We can now use matrix as a normal 2D array. To access the 2nd row and 5th column, we can write matrix[1][4].

Freeing a 2D Array

To deallocate a 2D array, we reverse the steps. First, we free each of the rows, then we free the array that points to all the rows.

<code>for (int i = 0; i < nrows; i++) {
  free(matrix[i]);
}
free(matrix);
</code>

Note that we can’t do this in the other order! If we free(matrix) first, we will have no way of getting the addresses of the row arrays we need to free.

2D Array Coordinates vs. Cartesian Coordinates

Note that 2D arrays (and matrices) work very differently than Cartesian coordinates. Suppose you have a 2D grid of letters:

<code>a b c d
e f g h
i j k l
</code>

Then your 2D grid has 4 columns (width = 4) and 3 rows (height = 3) You should thus create a 2D array with 3 rows and 4 columns (note that with arrays we list the rows first, then the columns).

The coordinate system we use for 2D arrays (and matrices) is different than Cartesian coordinates.

In Cartesian coordinates, (0, 0) is at the bottom left of the grid (the letter ‘i’). In 2D arrays (and matrices), [0][0] is at the top left of the grid (the letter ‘a’).

In Cartesian coordinates, we list the x position first and then the y position. For 2D arrays (and matrices), we list the y position (the row) first and then the x position (the column).

In Cartesian coordinates, incrementing the “y” position moves up. In 2D arrays (and matrices), incrementing the row number moves down (the first row is row 0, the second row is row 1, etc.).

So in Cartesian coordinates, (2, 3) would represent the letter ‘b’, but in 2D arrays, [2][3] would represent the letter ‘l’.

Depth first search

Depth first search is one of the most common search strategies and it is one that lends itself to recursion. Suppose you are standing in the middle of a maze (sort of like you are in this assignment!) and want to figure out where the exit is. How might you find your way out?

Here is one strategy: start walking through the maze. Each time you arrive at a choice of directions, pick one and keep walking. If you reach a dead end, or get to a part of the maze you’ve seen before, back up to the last place you made a choice and make a different one. Eventually, you will either find the exit of the maze or explore the entire maze and decide that there is no way out.

Consider trying to find your way out of this maze:

<code>.#.#
...#
e#..
#s.#
</code>

Assume that at each square, we try to go north, then south, then east, then west.

We start at s, and try to go N. We hit a wall, so we back up and try to go S. We go out of bounds, so we try to go E, which succeeds. We’re now in this situation, where the * shows where we are:

<code>.#.#
...#
e#..
#s*#
</code>

We try to go N, which succeeds. We try to go N again, which succeeds. We try to go N again, which succeeds. We’re now in this situation:

<code>.#*#
...#
e#..
#s.#
</code>

We try to go N again, which fails (out of bounds). We try to go S, which fails (we’ve already been to that square!), E, which fails (we hit a wall), then W, which fails (we hit a wall). Since we don’t have anywhere to go from here, we back up to the last place we made a choice:

<code>.#.#
..*#
e#..
#s.#
</code>

Now we try to go N (fails: already been to that square); S (fails: already been to that square); E (fails: wall); then W (succeeds):

<code>.#.#
.*.#
e#..
#s.#
</code>

Now we try to go N (fails: wall); S (fails: wall); E (fails: already been there); and W (succeeds):

<code>.#.#
*..#
e#..
#s.#
</code>

We then go N, which succeeds:

<code>*#.#
...#
e#..
#s.#
</code>

From here, there is no successful move to make, so we back up to the last place we made a choice:

<code>.#.#
*..#
e#..
#s.#
</code>

and try the next choice, S, which gets us to the exit!

The reason we call this a depth-first search is that we try each possible path until we can’t keep moving forward, then we back up one choice and try again, and so forth. Other searches may not explore a single path all the way to the end before trying a different path.

Depth First Search with Recursion

Depth first search can be readily solved with recursion. Each recursive call “visits” a single square in the maze and explores each of the possible paths leading out from that square. The goal of a sequence of recursive calls is to explore a specific path through the maze, and each time you call the recursive function, you’re making the path one step longer and visiting one more square of the maze.

You should interpret your recursive function as implementing the following logic: “Given all the squares I have visited so far, can I exit the maze by adding this square to the solution path?”” If the answer is no, that means the current square is not part of the solution path, and the recursive method should return false. If the answer is yes, that means the current square is part of the solution path, and you should add the square to the current path and return true.

The base case for a square is that the square represents the end of a path:

  1. It has been visited already — the path can’t be extended this way, so return false
  2. It is a wall — this path fails, so return false.
  3. It is out of bounds — this path fails, so return false.
  4. It is the exit — this path succeeds, so return true and add this square as the last square in the path

The recursive case for a square is that it doesn’t fall into one of the above four categories: it is an empty square that you haven’t visited before. In that case, the recursive case tries to make the path one step longer by visiting one more square in the maze: recursively call your search method four times, once for each of the four directions you could possibly move.

So what do you do with the return value of the four recursive calls you make?

  1. If one of them returns true, that means the direction that call explores is on the solution path, which also means the current square is on the solution path. Add the current square to the solution path, and return true.
  2. If the recursive call returns false, that means that direction doesn’t work, so move on to the next recursive call.
  3. If all the recursive calls return false, that means the current square can’t be on the solution path, so return false.

(Don’t forget to mark the current square as visited when the recursive method returns!)

Note that this recursive function follows the usual pattern: it calls itself and assumes those calls do the right thing.

What do you need to do?

In this assignment, you only need to write one method, depthFirstSolve in solver.c. depthFirstSolve is called by solveMaze, as you can see in the code, and is meant to be the recursive method that implements the logic described above. It takes four arguments:

  1. Maze * m: the maze you are trying to solve. Maze is declared in maze.h. Functions to read in the maze (readMaze) and free the maze (freeMaze) are defined in maze.c. Pay careful attention to the comments for the readMaze declaration in maze.h; they explain in detail what the
  2. MazePos curPos: the current square in the maze being “visited.”
  3. char * path: a character array containing the current path. The path is a null-terminated string using n, s, e, and w as directions to move. So, for example, the string "wwnes" represents a string that moves west twice, then north, then east, then south. We recommend PathType enum in path.h to represent the individual characters of the string.
  4. int step: a counter telling you how far along the current path you are.

and returns a boolean: true means that the current square being visited by depthFirstSolve is part of the solution, and false means that current square is not part of the solution.

One tricky bit here is figuring out how to update path correctly. Two hints: (i) step tells you how far along in the current path you are; and (ii) if you successfully exit the maze on the nth step, path[n] should be .

It is important that you get the format of the path correct so it is written out properly. Because the search order means that different people may find different solution paths, the way we will grade your code is by generating a solution path, then using the checkPath function to check that it is a valid solution to the maze.

Warning: Don’t be misled by the fact that you only have to write one method. This assignment will probably have the highest ratio of time spent thinking about what code to write to amount of code written of any assignment so far. Recursive code is often quite short — the instructors’ version of depthFirstSolve has about 25 lines of code — but takes a while to get right. Start thinking about your solution now, and don’t be afraid to ask questions on Piazza or in office hours to make sure your logic is right.

Testing your code

Depending on the order you choose to do your recursion (do you decide to look North first, or South first, etc) you can get a different path than someone else if a maze has many paths to the exit! How can you test if your path is correct? You can use the same path checker that we will use to verify if the path you create in HW9 is valid. To do this, you read in the maze and the proposed solution path from input files, and call checkPath to see if it is right. There is commented-out code in hw9.c that shows how to do this.

We have provided several mazes for you. maze1, maze3 and maze4 have valid solutions, while maze2 and maze5 do not.

What do you need to turn in?

Turn in your version of solver.c, with your implementation of depthFirstSolve. You do not need to modify any other files.