Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have already completed the setup part (steps 1 to 6). I need code from the Activity part (step 7). Please be quick! 1. Log

I have already completed the setup part (steps 1 to 6). I need code from the Activity part (step 7). Please be quick!

image text in transcribedimage text in transcribed

1. Log into your google cloud vm. 2. You'll need to install make on your VM before you can use it: sudo apt update sudo apt install make 3. You'll also need Java installed for this activity, so install the headless version (the headless version runs on systems without a graphical display, like our GCPVM): t.ade apl imilill oprrojidk 1/ jidk haradlere? 4. Use the wget command to download the starter files for this activity: 5. After downloading this file, use the tar command to extract its contents, and then the col command to move into the newly extracted folder: tar -xzf 02. Firstgithctivity.tar,gz cal 60 . Hirsthilac:livily 6. Ensure that git is using your name and @wisc.edu address, which can be set globally once per machine with the following commands (replace Your Name and YourAddress to reflect your own); git config --global user, name "Your Nane" git config --global user, email Youraddres sfisisc. edu - Note that if you make any mistakes through this relatively short activity, you can always correct those mistakes may creating a new commit with corresponding commit message as specified below. While grading, we'll be checking the most recent commit with a given message (whenever more than one commit with the same message exists). Activity 7. Once inside the 02.FirstGitActivity directory, create a new git repository for that directory. This should result in the creation of a git folder inside your 02.FirstGitActivity folder. This folder is a hidden folder by default, due to the leading period in the folder's name. To check it, you can use command 15a 8. Add the provided files Main.java and Makefile to the staging area, and then commit them with the message: "provided starter files without any changes". 7. Once inside the 02.FirstGitActivity directory, create a new git repository for that directory. This should result in the creation of a git folder inside your 02.FirstGitActivity folder. This folder is a hidden folder by default, due to the leading period in the folder's name. To check it, you can use command Is 8. Add the provided files Main.java and Makefile to the staging area, and then commit them with the message: "provided starter files without any changes". Be sure to include this (and future) commit message exactly as they are specified here: including punctuation, capitalization, and spacing. This will allow our grading script to find and verify that your work is done correctly. The outermost double quotes are only there to delimit the start and stop of the message, and may but do not need to be included within your commit messages. 9. Check the name of the primary branch in your repository, and then change it to main if that is not already it's name. 10. Edit the Main.java file: replace the angled brackets in the class header comments to reflect your own name, email, and cs login/username. Add these changes to staging and commit with the message "added name, email, and cs login to Main.java". 11. Run the command "make" to compile and run the code in Main.java. \{userginachine Jfolder\$ nake javac Mein.java java Main Why did two foos walks into a bar? 12. After doing this, the "git status" command should indicate that Main.class and submit are untracked (along with any backup files like Main.java or \#Main.java\# that your editor might have created). Since we don't want git to track these files, and we don't want to be constantly reminded about them being untracked, create a file named .gitignore with the following contents: .classsuhmit4%1\# The asterisks above are placeholders for any sequence of characters; so *.class hides our file named Main.class but also any other file ending with .class that we might create in the future. After creating this file new .gitignore file, it should become the only file that "git status" alerts you to being untracked. Go ahead and add .gitignore to staging before committing this change with the message "adding .gitignore for .class, submit, and backup files". 13. Next, update the Main.java source code, so that this program prints out a second line of text to complete the joke: To say "Hello world" to their friend Baz. Run make (again just type the command make in terminal) to ensure that your solution compiles and runs, and that it prints this second line precisely as shown above. Don't worry if this joke doesn't seem very funny to you & 3__ are often used as meaningless variable names, and they are combined with joke here . Once this is working, add and commit this change to source control with the commit message "implemented answer to joke

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Aided Database Design

Authors: Antonio Albano, Valeria De Antonellis, A. Di Leva

1st Edition

0444877355, 978-0444877352

More Books

Students also viewed these Databases questions