Tumgik
programmingsolver · 1 month
Text
CS3610 Project 5 Solution
Here in the great State of Ohio, each city is connected to at least one other city by at least one bi-directional road. In other words, Ohio is laid out as an undirected graph with some vertices sharing multiple (parallel) edges. Now the State is working to install recharging stations for electric cars in every city. Your job is to help nd the minimum battery range needed to travel between any…
Tumblr media
View On WordPress
0 notes
programmingsolver · 1 month
Text
CS3610 Project 4 Solution
In this project, you will write a program to simulate an external sorting algorithm. External sorting is used in scenarios in which the size of the dataset to be sorted exceeds the capacity of the main memory. In the rst stage of external sorting, the dataset is divided into a set of smaller, unordered sublists. Each sublist is then transferred from disk to memory and sorted individually using an…
Tumblr media
View On WordPress
0 notes
programmingsolver · 1 month
Text
CS3610 Project 3 Solution
For this project, you will write a recursive backtracking program to solve the knight’s tour problem as described in exercise 19 on page 393 of your textbook \Data Structures Using C++”. You have been provided template code that you must mod-ify to complete this assignment. Speci cally, you will implement the following two functions: void KnightsTour::move(int row, int col, int& m, int& num…
Tumblr media
View On WordPress
0 notes
programmingsolver · 2 months
Text
Project 2: Bit Ops, Debugging, Data Structures
This project addresses more advanced C programming topics each in its own problem. 1. Bit-level operations are common in C and systems programming. This assignment features a problem in which shifting and bitwise AND/OR-ing are required to complete the requirements. 2. Debugging is also a critical skill enabled by the debugger. The second problem in the assignment makes use of the GNU Debugger,…
Tumblr media
View On WordPress
0 notes
programmingsolver · 3 months
Text
P7: A Circular Linked List Solution
Goals To use C++ pointers to build a linked container class. To use either a friend declaration or an inner class to implement a one-many relationship. To implement a data structure as a template so that it can be reused. The CList Class The CList (circular linked list) class is a template container class (or, in Java terminology, a collection class) that can hold objects of any speci ed base…
View On WordPress
0 notes
programmingsolver · 3 months
Text
Program 4: Airport Check-in Solution
Goals To implement and use a linked-list queue and a linked-list priority queue. To use a controller class, a container class with two derived classes, and a polymorphic data class in one application. To program a simple simulation. The Idea Jetstream Airlines wants to run their airport check-in counter as e ciently as possible without causing passengers to miss ights. They have collected…
View On WordPress
0 notes
programmingsolver · 3 months
Text
P9: Chores using Threads Solution
Goals To simulate doing the Saturday Morning Chores, as in Program 8, but by using threads and shared memory instead of sockets. To use appropriate synchronization and locking with the shared memory. To use a signal to send information to a thread. Instructions The main program. Print the banner, instantiate Mom and call her run() function. Run this program several times and submit all the…
View On WordPress
0 notes
programmingsolver · 3 months
Text
P1: Using One Class Solution
Goals To build a simple class with all the usual parts. To use constructors and destructors. To attach your class to the prede ned output operator. To make a code module comprised of matching .hpp and .cpp les. To build a main program that incorporates a unit-test that will test all parts of your class. To build the rst part of the term project. Please note: This assignment provides a lot of…
View On WordPress
0 notes
programmingsolver · 3 months
Text
P2: One Player Solution
Goals To build a second simple class that will interact with the other classes in the future. To implement and use an enumeration type. To use the extern storage class. The Player Class This class represents one player. We are ready to implement some of its functions; more functions will be added later. Data members. A player has A name like RedWolf or RubyMan (no spaces) A color: a constant…
View On WordPress
0 notes
programmingsolver · 3 months
Text
P3: One Column of the Can’t Stop Board Solution
Goals To use enumerated types as return values and as subscripts. To model one part of the Can’t Stop game board. To build and execute good test plan. Instructions Section 45, below, provides information that explains how the game works and provides a basis for future assignments. However, this week, you do not need to implement anything in part 4. Column state. In your enum module, implement…
View On WordPress
0 notes
programmingsolver · 3 months
Text
Homework 1: Perceptrons Solution
For this homework you will write code to implement perceptrons and the perceptron learning algorithm. If you haven’t already, please sign up for the class mailing list: https://mailhost.cecs.pdx.edu/mailman/listinfo/m Perceptrons You will train 10 perceptrons that will, as a group, learn to classify the handwritten digits in the MNIST dataset. See the class slides for details of the perceptron…
View On WordPress
0 notes
programmingsolver · 3 months
Text
Program 4a: getopt() Solution
Goals To develop a command language for DiskSweeper. To use getopt() to process single-letter options. To build the rst phase of the DiskSweeper application. To learn or review some parts of C++ that will be needed in this course. The Project The Disk Sweeper application will search your hard disk for les that are copies of each other and report the full pathnames of all copies of the le.…
View On WordPress
0 notes
programmingsolver · 3 months
Text
Program 4b: getopt_long() Solution
Goals To nish program 4 by including and processing long options. Getopt_long() Instructions Write a program to parse the command line for DiskSweeper. Add to your Params class. Members of the class should include: A bool variable for the debug option and an int for the optional level number. A bool variable for the verbose option. De ne a controller class named Sweeper. Members of the class…
View On WordPress
0 notes
programmingsolver · 3 months
Text
P5: Directories and I-Nodes Solution
Goals To work with Unix directories and I-nodes. To read and process directory entries and I-nodes. To sort the data in a vector using a comparison function. Instructions Write a C++ program to analyze the entries in a disk directory. You will run this program from a Unix command shell, using command-line arguments. Your main function should accept argc and argv from the command shell, and…
View On WordPress
0 notes
programmingsolver · 3 months
Text
P7: Finishing File Sweeper Solution
Goals To calculate and use a cryptographic hash value. To identify duplicate les in a directory tree and output their path names. 1.1 Preparation For P6, you created a le tree as test data. Go into that tree and add several hard and soft links. Link things from di erent subdirectories and di erent levels of the same path. Create at least one le with multiple hard and soft links leading to it.…
View On WordPress
0 notes
programmingsolver · 3 months
Text
Homework 6 SOLUTION
This homework contains 2 questions. The last question requires programming. The maximum number of points is 100 plus 20 bonus points. PCA via Successive Deflation [30 points] (Adapted from Murphy Exercise 12.7) Suppose we have a set of n data points x1; : : : ; xn, where each xi is represented as a d-dimensional column vector. Assume that the data has been centerlized, i.e., having zero…
View On WordPress
0 notes
programmingsolver · 3 months
Text
Homework 6 SOLUTION
This homework contains 2 questions. The last question requires programming. The maximum number of points is 100 plus 20 bonus points. PCA via Successive Deflation [30 points] (Adapted from Murphy Exercise 12.7) Suppose we have a set of n data points x1; : : : ; xn, where each xi is represented as a d-dimensional column vector. Assume that the data has been centerlized, i.e., having zero…
View On WordPress
0 notes