BEST代写-线上编程学术专家

Best代写-最专业靠谱代写IT | CS | 留学生作业 | 编程代写Java | Python |C/C++ | PHP | Matlab | Assignment Project Homework代写

C语言代写 | CMPT 214– Programming Principles and Practice Assignment 6

C语言代写 | CMPT 214– Programming Principles and Practice Assignment 6

这个作业是用C语言完成几个应用问题的编程

CMPT 214– Programming Principles and Practice
Assignment 6

Question 1 (13 points):
It’s pretty sus when a Crewmate just randomly appears behind you in a room when you know that
you were alone. It’s even more sus when a body is found but everyone claims not to be the Impostor.
Pink is fed up with this, Brown has said that they’ve been in MedBay when a body was found in
Security one too many times. They created a program that will list all of the possible vents on a map
and all possible destinations from every vent, but they have no idea how to actually compile it. One
option would be to completely re-factor the code into one giant file, but Pink has spent too much time
on this and has put out a call for help. They’re looking at you to help them, and it would be pretty
sus of you to say no.
The Problem
You are provided with three .c files, two .h files, and three.txt files. None of these files should be
altered:
list.c: This file contains the implemented functions create_list, create_node, destroy_list.
list-adders.c: This file contains the implemented functions add_end.
vents.c: This file contains the bulk of the program. It includes the main function which is in charge
of calling the proper functions to create and populate an array that stores linked lists. Where
the head of each linked list represents the starting vent, and each node following it represents
possible vents you can travel to. Other implemented functions include: find_index, read_file ,
print_vent_locations, and print_possible_starting_vents.
list.h This is a header file that contains all function prototypes specific to linked lists, along with the
linked list and node data structures.
vents.h This is the header file that contains all function prototypes and macros specific to vents.c.
skeld.txt This file is structured similarly to travel-log.txt from the midterm. At the top of the file
there are two numbers, N and K, where N represents the number of unique vents, and K represents the number of <src> <dst> pairs. The difference between this file and the travel-log.txt
file, is that these pairs are bidirectional. This file contains all possible pairs for the Skeld map in
Among Us.
mira.txt This file is structured similarly to travel-log.txt from the midterm. At the top of the file
there are two numbers, N and K, where N represents the number of unique vents, and K represents the number of <src> <dst> pairs. The difference between this file and the travel-log.txt
file, is that these pairs are bidirectional. This file contains all possible pairs for the Mira HQ map
in Among Us.
polus.txt This file is structured similarly to travel-log.txt from the midterm. At the top of the file
there are two numbers, N and K, where N represents the number of unique vents, and K represents the number of <src> <dst> pairs. The difference between this file and the travel-log.txt
file, is that these pairs are bidirectional. This file contains all possible pairs for the Polus map in
Among Us.
Complete the following tasks:
1. Write a makefile that will compile an executable program named venting. To do this you will
need to:
(a) Create a target rule for list.o
(b) Create a target rule for list-adders.o
(c) Create a target rule for venting.o
(d) Create an all rule for the target rule that creates the venting executable
2. In your makefile you should also create a clean rule that removes all intermediate build targets,
similar to the example in the textbook.
Note: Be sure to make use of appropriate Makefile variables/macros so that the standard compiler
options that we have been using in CMPT 214 since the beginning are used to build the program.

Question 2 (4 points):
Git is a popular version control tool that you will likely use in future classes, in industry, and possibly
for any side projects you might wish to pursue in the future. In first year you have used Git locally,
however this differs greatly from remote projects, which is what the purpose of this question will
expose you to.
Complete the following tasks:
1. Create a project on the department’s Git Lab. If you’ve done the git
walkthrough from Topic 16 you should already know how to do this.
2. Clone said project onto your local machine.
3. Research yourself to find a git comment that will list the shortname of all remote servers you
have configured, as well as the URL associated with the shortname.
4. Take a screenshot of the terminal output resulting from you cloning the remote repository, and
the output for your git command to include in your submission.
Question 3 (2 points):
On tuxworld all student home directories are subdirectories of /student.
Write a single BASH command to find all subdirectories of /student that have the read permission
set for all users who are neither the file’s owner nor member’s of the file’s group. Then output
the permissions (first column), owner (third column), and group (fourth column) to a text file called
a6q3.txt along with your command.
Note: This question must be done without the use of sed(1) or awk(1) (which we have not taught!).
Furthermore, when trying to get the specific columns the output of your previous pipe will have
inconsistent space delimiters. Therefore, multiple spaces will need to be replaced with one space
before actually being able to select the columns.

bestdaixie

评论已关闭。