From 92d3c13c150a6f5d63abe20684859980216b48e7 Mon Sep 17 00:00:00 2001 From: Trishaan Date: Mon, 29 Sep 2025 01:52:59 -0700 Subject: [PATCH] Added comments to memoryGBValidator. --- src/code/ca/bcit/comp2522/lab03/IPhone16.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/code/ca/bcit/comp2522/lab03/IPhone16.java b/src/code/ca/bcit/comp2522/lab03/IPhone16.java index 10d1c1e..6cad3f8 100644 --- a/src/code/ca/bcit/comp2522/lab03/IPhone16.java +++ b/src/code/ca/bcit/comp2522/lab03/IPhone16.java @@ -10,7 +10,7 @@ package ca.bcit.comp2522.lab03; * @version 1.0.0 */ public class IPhone16 extends IPhone { - private static final int BASE_VARIANT_MEMORY = 16; + private static final int BASE_VARIANT_MEMORY = 128; private static final int IPHONE_HASH_WITH_HIGH_RES = 103; final boolean highResolutionCamera; @@ -118,6 +118,11 @@ public class IPhone16 extends IPhone { } + /** + * memoryGBValidator makes sure the right memory storage is assigned + * since it needs to be a multiple of 128. + * @param memoryGB passes the value of the memory to the method. + * */ public void memoryGBValidator(int memoryGB) { if (memoryGB % BASE_VARIANT_MEMORY != 0)