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
20 changes: 17 additions & 3 deletions Adder/src/adder/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,21 @@ public static void main(String[] args) {
}
}

private static int addArguments(String[] args) {
return Integer.valueOf(args[0]) + Integer.valueOf(args[1]);
}

private static int addArguments(String[] args) {
int flag=0,index=0,sum=0;
if(args[0].equals("-"))
{
flag=1;
index=1;
}
for(int i=index;i<args.length;i++){
if(flag==0)
sum+=Integer.valueOf(args[i]) ;
if(flag==1)
sum-=Integer.valueOf(args[i]) ;

}
return sum;
}
}
1 change: 0 additions & 1 deletion DELETEME.txt

This file was deleted.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Name: Abdulkadir Senlik
NetID: axs180014@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.
17 changes: 17 additions & 0 deletions answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
(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 "
8 changes: 8 additions & 0 deletions status.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

Abduls-MBP-2:~ abdulsenlik$ git --status
Unknown option: --status
usage: git [--version] [--help] [-C <path>] [-c name=value]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]