Java Assignment3 upload by TaeIlKIm#13
Open
james-taeil wants to merge 2 commits intoFastCampusKDTBackend:mainfrom
Open
Java Assignment3 upload by TaeIlKIm#13james-taeil wants to merge 2 commits intoFastCampusKDTBackend:mainfrom
james-taeil wants to merge 2 commits intoFastCampusKDTBackend:mainfrom
Conversation
Author
|
lalwr
reviewed
Apr 24, 2023
lalwr
left a comment
There was a problem hiding this comment.
과제하느라 고생하셨습니다 👍
깊은 복사와 얕은 복사에 대해 현재 이해하고 있는 부분을 정리해보시고 이해가 안되는 부분에 대해 얘기를 하면 좋을꺼 같습니다~
CAPACITY 는 기본 배열 크기를 지정하기 위해 사용하는 것이 목적입니다.
만든 코드에 대한 테스트 코드도 작성해보시면 좋지 않을까요?
| public class Electronic { | ||
| private static int serialNumber = 0; | ||
|
|
||
| String productNo; |
| this.productNo = today.format(DateTimeFormatter.ofPattern("yyMMdd")); | ||
| this.productNo += String.format("%04d", serialNumber); | ||
| this.companyName = companyName; | ||
| authMethods.add(auth); |
| this.userPhoneNumber = userPhoneNumber; | ||
| this.userEmail = userEmail; | ||
| this.userBirthDate = userBirthDate; | ||
| } |
| String userPhoneNumber, | ||
| String userEmail, | ||
| String userBirthDate | ||
|
|
|
|
||
| // 싱글톤 | ||
| private static Users instance; | ||
| public Users() {} |
|
|
||
| public Electronic findByProductNo(String productNo) { | ||
| for (Electronic electronic : electronicList) { | ||
| if (electronic.getProductNo().equals(productNo)) { |
| private static Electronics instance; | ||
| private static final int DEFAULT_CAPACITY = 10; | ||
| private Electronic[] electronicList; | ||
| private int size = 0; |
| int count = 0; | ||
| for (int i = 0; i < electronicList.length; i++) { | ||
| if (electronicList[i].getCompanyName().equals(company)) { | ||
| groupByCompanyElectronic[count] = electronicList[i]; |
| int count = 0; | ||
| for (int i = 0; i < electronicList.length; i++) { | ||
| if (electronicList[i].getAuthMethods().equals(authMethod)) { | ||
| groupByCompanyElectronic[count] = electronicList[i]; |
| public class Electronics { | ||
|
|
||
| private static Electronics instance; | ||
| private static final int DEFAULT_CAPACITY = 10; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
실습 2번
실습 3번