Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
idatt1002_2023_9
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Kluge Svendsrud
idatt1002_2023_9
Commits
9345ef0c
Commit
9345ef0c
authored
1 year ago
by
Harry Linrui XU
Browse files
Options
Downloads
Patches
Plain Diff
Updated method for calculating balance
parent
1c419752
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!43
Merging frontend-testing into master
,
!38
"Made progressbar dynamic in accordance to spending. Added balance field....
,
!37
Made the sub progress bars respond to changes in expense
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/no/ntnu/idatt1002/demo/data/Economics/Overview.java
+3
-3
3 additions, 3 deletions
.../java/no/ntnu/idatt1002/demo/data/Economics/Overview.java
with
3 additions
and
3 deletions
src/main/java/no/ntnu/idatt1002/demo/data/Economics/Overview.java
+
3
−
3
View file @
9345ef0c
...
...
@@ -77,12 +77,12 @@ public class Overview {
}
/**
* Method for updating the total
revenu
e
* by taking the
total sum of the income register
* Method for updating the total
balanc
e
* by taking the
max amount of the budget
* minus the total sum of the expense register.
*/
public
void
updateBalance
(){
balance
=
incomeRegister
.
getTotalSum
()
-
expenseRegister
.
getTotalSum
();
balance
=
budget
.
getMaxAmount
()
-
expenseRegister
.
getTotalSum
();
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment