Skip to content

Navigation Menu

Sign in
Sign up

Made it so products can have their amounts varied at runtime - #2

Open
leoamaro01 wants to merge 3 commits into
matcom:main from
leoamaro01:main
Open

Made it so products can have their amounts varied at runtime #2
leoamaro01 wants to merge 3 commits into
matcom:main from
leoamaro01:main

Conversation

@leoamaro01

@leoamaro01 leoamaro01 commented Apr 26, 2022

Copy link
Copy Markdown

No description provided.

Changed Units property's "set" accessor back to private.
Added AddUnits(int) method for this purpose.
Reformatted Add method in Cart to reflect this change.

Copy link
Copy Markdown
Author

There is a problem with these changes, the catalog product objects are the same as those in the cart, not copies, so when the Units property of a Product object is changed in the cart, the change is reflected in the catalog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /