Updated 3/29 with project grading %s CS 3377 Project The goal: create several versions of a process that updates and saves a binary file as a new file. The Setup This project will be done in 4 parts. To keep them separate, I implemented a factory pattern so that you (and the autograder) can test each copying method separately. It will look like this: FileModifierFactory: creates 1. Part1SimpleFileModifier: fill in during part 1 2. Part2MultiProcessModifier: fill in during part 2 3. Part3ThreadedModifier: fill in during part 3 4. Part4SocketModifier: fill in during part 4 You will be given (and not need to modify): 1. main.cpp. Launches the appropriate test based on the arguments 2. Util.cpp/h. Includes some useful attributes. 3. FileModifierFactory.cpp & .h. These build the proper PartXModifier based on the argument. 4. PipeCopier.cpp & .h. Helps you with the pipe for part 2. While each part will be tested separately, you are encouraged to reuse code as much of it will be useful for multiple parts. The File The file you are to read, modify, and save is a binary file that contains a sales list. A binary file is a non-text file, meaning some things (like numbers) aren’t stored as digits but as the ints/floats you use as variables. The name of the files to read and write will be in Util.h. The file will be structured like this: Field Size Type Purpose HEADER NumEntries 4 bytes Integer Tells you how many entries you need to read ENTRY (repeated NumEntries times) Date/Time sizeof(time_t) Time Timestamp (# seconds since 1/1/1970) Item ID Sizeof(int) Integer Item’s code Item Name 50 bytes char* Name of the item sold Item Quantity Sizeof(int) Integer Number sold Item Price Sizeof(float) Float Price of the products What You’ll Do In each part, the goal is to copy the file, adding two additional sales: 1. The Sobell book: a. Time 1612195200 (2/1/2020 4 PM GMT) b. ID 4636152 c. Name “A Programming Guide to Linux Commands, Editors, and Shell Programming by Sobell” [warning: this is more than 49 characters, so you have to truncate it—I say 49 because you need a null terminator] d. Quantity: 70 e. Price: 70.99 2. The Advanced Programming book a. Time 1613412000 (2/15/2020 6 PM GMT) b. ID 6530927 c. Name “Advanced Programming in the UNIX Environment by Stevens and Rago” [warning: more than 49 characters again] d. Quantity: 68 e. Price: 89.99 Be sure to update the total number of entries to account for these new ones. Part 1 (Due 3/29, worth 20%) You will read in the file (Util::inputFileName), add the two entries, and save the file (Util::outputFileName) using open(), close(), read(), and write(). You must use the low-level functions we will talk about in APUE chapter 3 (open, close, read, write). Failure to do so will result in 0 points for this part of the project. It is highly recommended that you do the file reading and writing in class(es) outside Part1SimpleFileModifier, as that code will be useful later. Part 2 (Due 4/12, worth 20%) In this case you will spawn a new process using fork() and exec(), and split the responsibilities like this: 1. The original process will read the file (2nd argument=2) and then write the data over a pipe to the child process. 2. The child process will read the file from the pipe (which will be set to standard input) and write the data to the output file. 3. PipeMaker will take care of the pipe setup for you: a. Create PipeMaker before the fork. b. In the parent process, call setUpToWrite() to ready this process for writing. You’ll get back the file descriptor to write to. Write the file data to that file descriptor (hint: it’s just like writing to a file). c. In the child process, before execing, call setUpToRead() to dup the pipe output to standard input. You can then exec the process (21S_CS3377_Project) with the write option (2nd argument=3), read the data from standard input (just a file descriptor, remember!), and write to the output file. d. Either the parent or the child process can do the update (but not both, obviously). When calling exec, use the command 21S_CS3377_Project 2 3. This will trigger main to give you the proper setup for the child process. You will be responsible for spotting the Util::IOType of WRITE (3), and read from standard input rather than the input file. Part 3 (Due 4/26, worth 30%) In this part you will create a thread and pass the file data from one thread to the other. The threads will be like this: 1. Main thread: read the data, create the thread, and pass the data along 2. Created thread: receive the data and output it to the file I did all of this inside of Part3ThreadedModifier. Create a mutex and condition for both threads to share, and pass a pointer to the Part3ThreadedModifier object to pthread_create (and read it in the other thread). Then you can use the shared mutex and condition to coordinate passing the data. The easiest way to pass the data is to use a variable inside Part3ThreadedModifier (type EntryInfo). The main thread should lock the mutex before creating the receiving thread (and the receiving thread should attempt to lock the mutex right after it starts up) to ensure the proper ordering. Then do a loop in each thread like this: Main (sending) thread Receiving thread Wait on shared condition (for writing thread to be ready) Signal condition to say we’re ready Wait on condition (for an entry to be ready) Update the variable with the next entry Signal the condition Loop around and wait on the condition again Retrieve the info, save it for later writing Loop around and signal the condition again Once you’ve passed all the entries (5 or 7 depending on where you want to add the new ones), unlock the mutex on both sides. Part 4 (Due 5/10, worth 30%) Here you will use two processes again, this time with a socket connecting them. A port number to use (12345) is at Util::portNumber. • Note: if you get an error that the port is already in use, it’s likely because you just ran the project and the operating system hasn’t released the port yet. You can either wait a bit (a few minutes at most) or change the port number (12346, etc.). When I did this step, I reversed the setup from part 2: the main process here reads from the socket (writing to the output file) and the spawned process writes to the socket (reading from the input file). Again, it is up to you where you want to add the two new entries. When you spawn the 2nd process, use 21S_CS3377_Project 4 3. After the fork, the socket reading process (parent process for me) creates a socket and listens on that socket using the port number above. The socket writing process (child process for me) creates a socket and connects to the listen socket. Depending on the timing of things the listen socket may not be ready the first time; here is code to repeatedly wait for the listen socket to be available: int amountToWait = 1; while ( connect(fileDescriptor, (struct sockaddr*) &serverAddress, sizeof(serverAddress))) { if ( errno != ECONNREFUSED) { // Something unexpected happened throw FileModifyException(“Error connecting”); } std::cout << "Not ready to connect yet...n"; // Exponential backoff sleep(amountToWait); amountToWait = amountToWait * 2; } Once the connection is made (reader gets back a file descriptor from accept() and the writer gets out of the loop above) you can transfer the data. Remember that a socket is just a file descriptor, so your code to write/read from earlier parts will work here, too.
GO19_AC_CH01_GRADER_1G_HW – College Construction 1.0
GO19_AC_CH01_GRADER_1G_HW – College Construction 1.0
#GO19_AC_CH01_GRADER_1G_HW – College Construction 1.0
#GO19 AC CH01 GRADER 1G_HW – College Construction 1.0
Project Description:
In this project, you will create database objects to track the construction projects and the events related to the projects at a college. You will create a table and import data from Excel to create a second table. You will use a database template to enter data into the Events table. You will create a simple query, a form, and a report.
Start Access. Open the file Student_Access_1G_College_Construction_HW.accdb downloaded with this project. Close the Event List multiple-items form that automatically opened. Open the Navigation Pane.
In Datasheet view, create a new table. Beginning in the second column of the table and using the data type of Short Text, create the Building Project, Site, and Contractor fields (in that order). In the fifth column, using the Currency data type, create the Budget Amount field.
Change the data type of the ID field to Short Text, rename the ID field to Project ID and change the Field Size to 5
Starting in the Project ID field, add the following three records to the new table:
P-356
Student Center, 3-story
Northeast Campus
RR Construction
61450000
P-823
Student Center, 2-story
Southeast Campus
RR Construction
41960000
P-157
Health Professions Center
Northwest Campus
Marshall Ellis Construction
42630000
Save the table as 1G Projects, and then close the table.
Append the records from the downloaded Excel file a01G_Projects.xlsx to the 1G Projects table.
In the Navigation Pane, organize the objects by Tables and Related Views. Open the 1G Projects table (the table has eight records). Close the Navigation Pane.
Switch the 1G Projects table to Design view. For the Project ID field, enter a description of Enter the Project ID using the format P-### For the Site field, enter a description of Campus Location. Save the table.
Switch to Datasheet view, apply Best Fit to all of the fields in the table, save the table, and then close the table.
Import the records from the downloaded Excel file a01G_Contractors.xlsx into the database as a new table named 1G Contractors. Designate the first row as column headings and the CO ID field as the primary key.
Open the 1G Contractors table in Datasheet view (the table has four records). Apply Best Fit to all of the fields in the table, save the table, and then close the table.
Based on your 1G Projects table, use the Query Wizard to create a simple query. Add the Site, Building Project, and Budget Amount fields (in that order). Keep the default name of 1G Projects Query, click Finish to display the query results, and then close the query.
Based on your 1G Projects table, use the Form tool to create a form for the table. Save the form as 1G Project Form, display the form in Form view, and then close the form.
Based on your 1G Projects table, use the Report tool to create a report. Delete the Budget Amount field from the report. Save the report as 1G Projects Report.
Sort the Building Project field in ascending order. Set the width of the Building Project, Site, and Contractor fields to 2 inches. Delete the page number from the report, save the report, and then close the report.
Open the Navigation Pane, open the Event List form, and then close the Navigation Pane. In the Event List multiple-items form, enter the following two records (the Start Time and End Time data will reformat automatically):
Title: Groundbreaking Start Time: 6/13/22 10a End Time: 6/13/22 11a Description: Student Center groundbreaking Location: Northeast Campus
Title: Dedication Start Time: 8/26/22 12:30p End Time: 8/26/22 2p
Description: Gymnasium building dedication Location: Southwest Campus
In the Event List form, click New Event, and in the Event Details single-record form, enter the following record (the Start Time and End Time data will reformat automatically):
Title: Community Arts Expo Start Time: 10/5/22 6p
End Time: 10/5/22 9p Description: Book and Art Expo at Library Location: Southeast Campus
You are in charge of managing a local softball
You are in charge of managing a local softball team, one in which there is a lot of turnover. While you have a couple of regulars, much of the team members come and go frequently. When it comes to organizing games, it is becoming more and more difficult to keep track of the current members, so you decide to write a small program to help you track the current players.Write a modularized program that will utilize a main menu to control the program’s functions and a list to store the members of your team. The following functions that your program needs to include:Print the current member list.
Add a new member.
Remove a member.
Modify an existing member.
Exit the program
Remember that you can create a function using ‘def.’ In other words, for adding a new member, you will need a function similar to: ***** *****
Activity 3- Project Risk/ Quality Mngt
#1. What are the benefits an organization can receive from the adoption of a risk management system?
- Describe the risk management system application.
- What roles do security and capacity play within the risk management process?
- What is the purpose of a risk management system?
- Describe the various risk management methodologies used for risk assessment and how they relate to a systematic approach.
Text
Text
Title: Managing Project Risks
ISBN: 9781119489733
Authors: Peter J. Edwards, Paulo Vaz Serra, Michael Edwards
Publisher: John Wiley & Sons
Publication Date: 2019-08-13
Respond to the discussion about algorithms and their roles below using 150 words or more. At the most basic level, an algorithm is simply a set of step-by-step instructions that we utilize to accomplish a specific task. We use algorithms every si
Respond to the discussion about algorithms and their roles below using 150 words or more.
At the most basic level, an algorithm is simply a set of step-by-step instructions that we utilize to accomplish a specific task. We use algorithms every single day in our day-to-day activities: Brushing our teeth, getting dressed, driving to work, making dinner. These daily tasks which we complete are all composed of a set of instructions that starts with a certain action and ends with a certain action.
In the realm of computer programming, algorithms are utilized to enhance the efficiency, effectiveness, and functionality of the programs we create. Two such types of algorithms are searching algorithms and sorting algorithms.
Sorting algorithms are designed to sort an array of objects into a specific order. Searching algorithms are designed to compare the elements of an array to find a particular value within an array of objects. Just a few examples are search engines, the sorting of a business’ online item inventory, and sorting/searching a database of students who attend a university.
There are multiple approaches which people have taken to solve the issue of sorting and searching an array of items. Two frequently used searching algorithms are linear search and binary search. Three frequently used sorting algorithms are insertion sort, selection sort, and bubble sort.
Each of these types of algorithms have both pros and cons associated with them. The main properties that we want to keep an eye on when choosing an algorithm are memory usage, maintainability, and time complexity. It is always best to assess the situation and to use discretion when choosing which algorithm that we want to implement into our program.
Internet Security In Management Information Systems
Project Topic: Internet Security.
Research Paper in APA Format
The paper should discuss in detail a management information system that could serve the needs
of an organization and/or company in advancing its mission. Provide an analysis of the
technology and industry trends. This paper should have the most recent technological
developments that have occurred with the technology. Think about how the technology helps
with achieving operational excellence, improving decision making, and achieving competitive
advantage. The paper must be in
APA format.
Length: The research paper should be between 8 and 10 pages. In addition, there must be a
title/cover and reference page. If you use graphics, such as pictures or graphs, do not include the
space taken as part of the total number of pages.
Content:
– Absolutely no quotations more than 10 words (must show appropriate in-text citations)
– Paraphrase sources with appropriate in-text citations
-Strong introduction, which should:
1- immediately and concisely convey to the reader what the topic is;
2-convey to the reader how the research paper will be organized;
3-include a strong thesis statement (indicate what the point of the paper is
References:
-Your research paper will have in-text citations. The last page of your research paper will
have a corresponding reference page in APA format. For more on APA style guidelines,
please see:
https://owl.purdue.edu/owl/research_and_citation/apa_style/apa_style_introduction.html
-Your research paper must include at least five references including two peer reviewed
academic journal articles. Do not use Wikipedia as it is not credible; non-experts write it.
Week 2 discussion
Discussion Points:
● Discuss the hierarchy of the main steps of the UX process and explain interconnectivity between them.
● Examine and explain Human-Computer Interaction, Usability, Quality in Use, and User Experience interrelation. Please illustrate with real-life examples.Thinking of Dropping? Select the link.
DF-6
Describe the plain view doctrine, and why it has such a significant impact on digital forensics? What are three approaches to determining whether the doctrine applies to a specific case.
300 words
Java help
Instructions:
- Create a program that will model a music playlist by using an ArrayList that holds Song objects.
- Using jGRASP, write a Java program named LastnameFirstname14.java, using your last name and your first name, that does the following:
- Uses an ArrayList to model a music playlist.
- Uses Song objects to represent songs in the playlist, with the following instance variables:
- Title
- Artist
- Minutes
- Seconds
- Note: Your toString should print minutes and seconds together (see possible examples below in the Expected Output section)
- Create a method called createPlaylist. Create an ArrayList of at least 5 songs of your choice. Return the ArrayList.
- Create a method called editPlaylist. An ArrayList of Song objects will be passed to this method. In this method, ask the user if they would like to add or remove a song to the playlist, or if they change their mind and don’t want to add/remove any songs.
- If they choose to add a song, ask them for the song information. Create a Song object and add it to the ArrayList.
- If they choose to remove a song, print out the ArrayList in a readable format — in other words, don’t just use “System.out.println(playlist);” (see below for Example Output).
- If they change their mind and do not want to add/remove a song, don’t change anything.
- Return the ArrayList.
- Note: I recommend you use a loop here so that the user can add/remove as many songs as they like. This makes for a better, more useful program, but it is not required for this assignment.
- Create a method called savePlaylist. This playlist will have two parameters: the ArrayList and an indicator for whether the user would like to append to or overwrite a file. In the file, record the date that the playlist was saved, then write the ArrayList information to the file in a readable format — in other words, don’t just use “System.out.println(playlist);”. Confirm to the user that the file was successfully saved, and print the filename or filepath.
- In the main method:
- Call the createPlaylist method, then print the returned ArrayList. Make sure to print it out in a readable format — in other words, don’t just use “System.out.println(playlist);” (see below for Example Output).
- Ask the user if they would like to edit your playlist. If so, call the editPlaylist method and print the returned ArrayList.
- Ask the user if they would like to save the playlist. If so, call the savePlaylist method.
- Your program MUST:
- Create at least 5 Song objects, all with valid data
- Store the Song objects in an ArrayList
- Use the printPlaylist method to write out the data for all Song objects in your ArrayList to a separate text file in a neatly arranged format.
- Actively use in-line comments stating what each section of code does.
- Use try/catch if, and only if, necessary.
- Your program must conform to the Java coding standards reviewed in class during Week 3.
- Your program should not use code/concepts we have not yet covered. You must demonstrate that you have mastered the concepts covered in class.
- Remember to always begin your code with the following documentation comments:
/**
* Short description of the program.
*
* @author Last Name, First Name
* @assignment ICS 111 Assignment XX
* @date Today's Date
* @bugs Short description of bugs in the program, if any.
*/
Expected Output:
You may format your toString any way you want, as long as it presents the song info in a readable manner. Here are some suggestions:
“Say So” by Doja Cat (3:58)
“South” by Galimatias
3 minutes 35 seconds
Title: “Fly – FKJ Remix”
Artist: June Marieezy, FKJ
Time: 4:12
Feel free to choose one of these formats, or make up your own!
The following example uses the 1st format. The example also adds in the option to allow the user to continuously add/remove songs until they choose to stop, and to specify where in the playlist they’d like to add a song. These two features are optional.
----jGRASP exec: java ManuelNikki14
Hey! Check out this really cool playlist I made!
*** My 2am Playlist ***
"Solitude" by re:plus (4:16)
"Paris in the Rain" by Lauv (3:24)
"Enamored" by Ibrahim (feat. Limes) (2:47)
"Never Gonna Give You Up" by Rick Astley (3:35)
"Spending Late Nights with You" by Rook1e (feat. Aimless) (1:36)
"Kimi no Toriko (remix)" by Heiakim (2:55)
What do you think? Should I make any changes?
Type yes or no: yes
Should I add or remove a song?
(Or if you change your mind, you can say nevermind!)
Type add, remove, or nevermind: add
Okay, let's add a song! Please enter the song information:
Song title: "in your arms"
Artist: Saib
Minutes: 4
Seconds: 37
What # song in the playlist should it be? 3
Now adding "in your arms" by Saib (4:37) as #3 on the playlist...
Here's the new playlist:
*** My 2am Playlist ***
"Solitude" by re:plus (4:16)
"Paris in the Rain" by Lauv (3:24)
"in your arms" by Saib (4:37)
"Enamored" by Ibrahim (feat. Limes) (2:47)
"Never Gonna Give You Up" by Rick Astley (3:35)
"Spending Late Nights with You" by Rook1e (feat. Aimless) (1:36)
"Kimi no Toriko (remix)" by Heiakim (2:55)
What do you think? Should I add or remove a song?
(Or if you're done editing, you can say finished!)
Type add, remove, or finished: remove
Okay! Just in case you forgot, here is the current playlist:
*** My 2am Playlist ***
"Solitude" by re:plus (4:16)
"Paris in the Rain" by Lauv (3:24)
"in your arms" by Saib (4:37)
"Enamored" by Ibrahim (feat. Limes) (2:47)
"Never Gonna Give You Up" by Rick Astley (3:35)
"Spending Late Nights with You" by Rook1e (feat. Aimless) (1:36)
"Kimi no Toriko (remix)" by Heiakim (2:55)
Which # song would you like to remove? 5
Now removing "Never Gonna Give You Up" by Rick Astley (3:35)...
Here's the new playlist:
*** My 2am Playlist ***
"Solitude" by re:plus (4:16)
"Paris in the Rain" by Lauv (3:24)
"in your arms" by Saib (4:37)
"Enamored" by Ibrahim (feat. Limes) (2:47)
"Spending Late Nights with You" by Rook1e (feat. Aimless) (1:36)
"Kimi no Toriko (remix)" by Heiakim (2:55)
What do you think? Should I add or remove a song?
(Or if you're done editing, you can say finished!)
Type add, remove, or finished: finished
Sounds good. What a great playlist! :)
Once you close this program, you're gonna lose all the playlist data.
Would you like to save it to a file, so you can refer to it later?
Type yes or no: yes
This playlist will now be saved to: playlist.txt
Would you like to append to or overwrite this file?
Type append or overwrite: append
Okay, got it!
Playlist is now saved to: /home/nikki/Desktop/playlist.txt
Thanks for using my program. Bye!
----jGRASP: operation complete.
Submission Instructions:
- Submit your LastnameFirstname14.java file through Laulima via the Assignments section.
- In addition, submit any additional files needed to run your program.
- DO NOT submit the .class file, submit only the .java file.
Grading:
- This assignment is out of 50 points.
- -10 points for each method
- -5 points for ArrayList or object class errors
- -5 points if user does not use conditionals, loops, arrays, or methods if possible
- -5 points if assignment is not submitted to specifications. For example, documentation comments are not included or are incomplete/incorrect, file name does not follow the specified format, your name is not included in the file name, wrong file attached, etc.
- (-1 to -5 points) Miscellaneous mistakes, bugs, or problems.
Assignment will receive a grade of 0 (zero) points if instructions are not adhered to.
question 3
Needs done by 8am Est 6/5