Skip to content

Commit

Permalink
[#1] first commit, Fruit Class definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Wody95 committed Mar 9, 2021
1 parent a02ced5 commit 022e8f7
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 1 deletion.
16 changes: 16 additions & 0 deletions JuiceMaker/JuiceMaker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
70320B2125F705F9001E49E6 /* Fruit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70320B2025F705F9001E49E6 /* Fruit.swift */; };
70320B2425F70605001E49E6 /* Juice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70320B2325F70605001E49E6 /* Juice.swift */; };
C73DAF37255D0CDD00020D38 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C73DAF36255D0CDD00020D38 /* AppDelegate.swift */; };
C73DAF39255D0CDD00020D38 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C73DAF38255D0CDD00020D38 /* SceneDelegate.swift */; };
C73DAF3B255D0CDD00020D38 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C73DAF3A255D0CDD00020D38 /* ViewController.swift */; };
Expand All @@ -17,6 +19,8 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
70320B2025F705F9001E49E6 /* Fruit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Fruit.swift; sourceTree = "<group>"; };
70320B2325F70605001E49E6 /* Juice.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Juice.swift; sourceTree = "<group>"; };
C73DAF33255D0CDD00020D38 /* JuiceMaker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JuiceMaker.app; sourceTree = BUILT_PRODUCTS_DIR; };
C73DAF36255D0CDD00020D38 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
C73DAF38255D0CDD00020D38 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
Expand All @@ -39,6 +43,15 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
70320B1F25F705EA001E49E6 /* Type */ = {
isa = PBXGroup;
children = (
70320B2025F705F9001E49E6 /* Fruit.swift */,
70320B2325F70605001E49E6 /* Juice.swift */,
);
path = Type;
sourceTree = "<group>";
};
C73DAF2A255D0CDC00020D38 = {
isa = PBXGroup;
children = (
Expand All @@ -58,6 +71,7 @@
C73DAF35255D0CDD00020D38 /* JuiceMaker */ = {
isa = PBXGroup;
children = (
70320B1F25F705EA001E49E6 /* Type */,
C73DAF36255D0CDD00020D38 /* AppDelegate.swift */,
C73DAF38255D0CDD00020D38 /* SceneDelegate.swift */,
C73DAF3A255D0CDD00020D38 /* ViewController.swift */,
Expand Down Expand Up @@ -140,9 +154,11 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
70320B2125F705F9001E49E6 /* Fruit.swift in Sources */,
C73DAF3B255D0CDD00020D38 /* ViewController.swift in Sources */,
C73DAF37255D0CDD00020D38 /* AppDelegate.swift in Sources */,
C73DAF39255D0CDD00020D38 /* SceneDelegate.swift in Sources */,
70320B2425F70605001E49E6 /* Juice.swift in Sources */,
C73DAF4C255D0D0400020D38 /* JuiceMaker.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
4 changes: 3 additions & 1 deletion JuiceMaker/JuiceMaker/JuiceMaker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@

import Foundation

/// 쥬스 메이커 타입
/// 쥬스 메이커 타입


26 changes: 26 additions & 0 deletions JuiceMaker/JuiceMaker/Type/Fruit.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// Fruit.swift
// JuiceMaker
//
// Created by 기원우 on 2021/03/09.
//

import Foundation

class Fruit {
var stock: Int = 10

func upStock(count: Int) {
self.stock -= count
}

func downStock(count: Int) {
self.stock -= count
}
}

var strawberry = Fruit()
var banana = Fruit()
var pineapple = Fruit()
var kiwi = Fruit()
var mango = Fruit()
9 changes: 9 additions & 0 deletions JuiceMaker/JuiceMaker/Type/Juice.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//
// Juice.swift
// JuiceMaker
//
// Created by 기원우 on 2021/03/09.
//

import Foundation

0 comments on commit 022e8f7

Please sign in to comment.