https://www.davidseek.com/ood/
How I Cracked the Object Oriented Design Interview at Amazon
I'm explaining the tech Interview process at FAANG and Amazon in regards to Object Oriented Design and Programming and my preparations to succeed.
www.davidseek.com
https://dololak.tistory.com/17
[Java] Type Safe란?
Type Safe(타입 세이프) 란 말그대로 타입에 안정적인 것을 의미합니다. 타입에 불안정적이다 라고 하는것은 타입을 판별(Type Check) 하지 못해 Runtime 시 타입으로 인한 문제가 발생하는 것입니다. Typ
dololak.tistory.com
puppy hotel 디자인해보자.
호텔에는 소형견용 , 중형견용 , 대형견용 객실
이제 면접관에게 올바른 질문을 하는 것은 우리의 몫입니다. 여기에는 디자인이 완전히 채울 것으로 예상되는 기능을 명확히 하기 위한 질문이 포함됩니다.
절대 가정하지 마십시오. 모호한 질문을 처리하는 방법을 알아보기 위한 인터뷰의 일부입니다. 명확한 질문을 하고 있습니까, 아니면 코드로 바로 뛰어들어 면접 코딩을 잘못된 방향으로 낭비할 가능성이 있습니까?
1. 면접관한테 호텔이 어떤 능력이 필요한지 물어보라. 체크인과 체크아웃해야됨.
내가 무엇을 개발해야하는지 알게되면. 면접관과 대화를 시작하기위해 몇가지 코드조각으로 시작
while typing code. im explaining what im doing
class Hotel {
func checkIn(_ dog: Dog) -> String // 1
func checkOut(_ dog: Dog) -> Dog? // 2
}
- We're creating a Hotel class and we're giving it the following definitions a function to check a dog in that returns a roomID.
- And a function that returns the Dog to when checking out.
Next I'd design a quick type for the Dog.
struct Dog { // 1
let uid: String // 2
let size: DogSize // 3
}
enum DogSize {
case small, medium, large
}
- Since we're iOS engineers, we want to use a light weight type like a struct
- Every dog needs an id for identification
- And since the hotel cares for the sizes of the dogs, we're creating a type definition as well. An integer's intention is not easy to read for humans, Strings are of high risk of errors due to typos. Tell your interviewer, that type-safety is important to you. Really hard to disagree.
'아마존 면접 준비 > OOD' 카테고리의 다른 글
빌더패턴 1. (0) | 2022.10.03 |
---|---|
OOD 공부 현명하게 (0) | 2022.10.03 |
주차장 설계? (0) | 2022.10.03 |
파이썬 클래스메소드. (__init__, show, set, get) (0) | 2022.10.03 |
주니어 SDE를 위한 Amazon OOP 면접 준비 방법 (0) | 2022.10.03 |