Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 23 additions & 14 deletions Adder/src/adder/Main.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
package adder;
File: Main.java

public class Main {

public static void main(String[] args) {
try {
int result = addArguments(args);
System.out.println(result);
} catch (Exception e) {
System.err.println("Please provide two integers to add");
public class Main
{
public static void main(String args[])
{
try
{
int result = addArguments(args);
System.out.println(result);
}
catch(Exception e)
{
System.err.println("Please provide integers to add ");
}
}
private static int addArguments(String[] args)
{
int sum = 0 ; // variable to store sum
for(int i=0; i < args.length; i++)// Loop to add all array element
{
sum = sum + Integer.valueOf(args[i]); // compute sum
}
return sum; //return sum
}
}

private static int addArguments(String[] args) {
return Integer.valueOf(args[0]) + Integer.valueOf(args[1]);
}
}
1 change: 0 additions & 1 deletion DELETEME.txt

This file was deleted.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Name:Jonathan German
NetID: JXG190036@utdallas.edu
# Assignment 1 Example repository

In this assignment you will perform a series of basic Git actions to get you familiarized with the basics.
18 changes: 18 additions & 0 deletions answers.tx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
(a) How many commits exist in the repository history after completing step 8 (Including commits made by the original author)?
12 commits exist in the repository history after completing step 8.

(b) When was the file .gitignore added?
.gitignore file was added four years ago.

(c) What is the difference between git log and git status?
Git log shows the repository history while git status shows the current working directory and the staging area.

(d) What is the difference between unstaged and untracked files?
Untracked files are not on git while unstaged files are on git but are not marked for commit.

(e) What is the difference between git checkout and git reset?
Git Resset is specifically used for upadating the index while git checkout is for updating the working tree directly.

(f) What happens if you try to pull remote changes when there are uncommitted changes in your working directory?
Git will give the following error message so you do not loose any vital code : "Cannot checkout as your working directory has uncommitted changes "
TEST
13 changes: 13 additions & 0 deletions status.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
jgerm@DESKTOP-S869PSA MINGW64 /c/Users/jgerm/Desktop/Project File 3354/project file 3354/3354-git (master)
$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: README - Copy.md

Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: README - Copy.md