playXP

서브 메뉴

Page. 1 / 12520 [내 메뉴에 추가]
글쓰기
작성자 아이콘 얼음덕후노메
작성일 2012-03-08 15:07:21 KST 조회 247
제목
번역좀 도와주삼

Implement a class that represents an amount of time in hours, minutes, and seconds.
The class should provide a constructor that sets the time to a specified number of hours, minutes, and seconds.
The default constructor should create an object for a time of zero hours, zero minutes, and zero seconds.
The class should provide getter methods that return the hours, minutes, and seconds separately, and a getter method that returns the total time in seconds
(hours × 3600 + minutes × 60 + seconds).
A comparison method should be provided that test which time passed as parameters are greater.
If the two times are equal, the method should return 0. If the object time is less than the passed parameter, it should return -1.
If the object time is greater than the passed parameter, it should return 1.
 A method should be provided that adds one time to another, and another function that subtracts one time from another.
The class should not allow negative times (subtraction of more time than is currently stored should result in a time of 00:00:00).
The constructors should set all the hours, minutes, and seconds to 0 if any of the three values are out of range.

 

프로그래밍 과제인데

 

일단 시간가지고 놀아야한다는건 알겠는데 어떻게 노는건지 잘 모르겠듬.

 

초를 넣어서 시/분/초가 나오게 하란건가.

지속적인 허위 신고시 신고자가 제재를 받을 수 있습니다.
신고 사유를 입력하십시오:

아이콘 흑인경비원 (2012-03-08 15:09:52 KST)
0↑ ↓0
센스 이미지
하얀 건 종이고 까만 건 글자인게 분명합니다
킷플라 (2012-03-08 15:25:48 KST)
0↑ ↓0
센스 이미지를 등록해 주세요
컨스트럭터가 생성자 맞나. 시쁠쁠 내용같은데 대충 클래스를 만들고 생성자로 시분초를 지정한담에.... 으아아아
[Yogg-Saron] (2012-03-08 15:30:32 KST)
0↑ ↓0
센스 이미지를 등록해 주세요
임플리먼트 어 클래스 댓 리프레젠트스 언 어마운트 오브 타임 인 아워 미닛츠, 앤 세컨즈.
더 클래스 슈드 프로바이드 어 콘스트럭터 댓 셋 더 타임 도 어 스페시파이드 넘버 오브 아워, 미닛츠, 앤 세컨즈.
더 디폴트 컨스트럭터 슈드 크리에이트 언 오브젝트 포 어 타임 오브 제로 아워즈, 제로 미닛츠, 제로 세컨즈.
더 클래스 슈드 프로바이드 게더 메소즈 댓 리턴 더 아워즈, 미닛츠, 앤 세컨즈, 세퍼레틀리, 앤 어 게더 메소드 댓 리턴즈 더 토탈 타임 인 세컨즈.(아워즈 × 3600 + 미닛 × 60 + 세컨즈.)
어 컴패러슨 메소드 슈드 비 프로바이디드 댓 테스트 위치 타임 패스드 애즈 파라미터즈 아 그레이터.
이프 더 투 타임즈 아 이콜, 터 메소드 슈드 리턴 제로. 이프 더 오브젝트 타임 이즈 리스 댄 더 패스드 파라미터, 잇 슈드 리턴 마이너스 원.
어 메소드 슈드 비 프로바이드 댓 매드즈 원 타임 투 어나더, 앤 어나더 펑션 댓 서브트랙츠 원 타임 프롬 어나더.
더 클래스 슈드 낫 얼로우 네거티브 타임즈(서브트랙션 오브 모어 타임 탠 이즈 커렌틀리 스토어드 슈드 리설트 인 어 타임 오브 00:00:00).
더 컨스트럭터즈 슈드 셋 올 더 아워즈 미닛츠, 앤 세컨즈 투 제로 이프 애니 오브 더 쓰리 밸류 아 아웃 오브 레인즈.
아이콘 얼음덕후노메 (2012-03-08 15:31:05 KST)
0↑ ↓0
센스 이미지
ㄴ고대신의 속삭임이 들린다
아이콘 적당새 (2012-03-08 16:19:54 KST)
0↑ ↓0
센스 이미지
Implement a class that represents an amount of time in hours, minutes, and seconds.
시, 분, 그리고 두번째들에 내에 시간의 양을 대표하는 하나의 계급 시행하라.

The class should provide a constructor that sets the time to a specified number of hours, minutes, and seconds.
계급은 특정한 수의 시, 분, 그리고 두번째들 시간을 지정하는 건설로봇 한 기 제공한다 해야만.

The default constructor should create an object for a time of zero hours, zero minutes, and zero seconds.
그 노업건설로봇 영 시간, 영 분, 그리고 영 두번째들의 시간 대한 물건 창조해야한다.

The class should provide getter methods that return the hours, minutes, and seconds separately, and a getter method that returns the total time in seconds
그 계급 시간, 분, 그리고 두번째들 별도로 보답하는 게터 방법들과, 그리고 두번째들내에 총 시간 보답하는 하나의 게터 방법 제공해야만 한다.

(hours × 3600 + minutes × 60 + seconds).
(우리것 × 36세기 + 분 × 60 + 두번째들).

A comparison method should be provided that test which time passed as parameters are greater.
에이 비교법 어느시간 지나간 매개변수로 훌륭하다인가 실험 제공되어짐당해짐당해져야한다.

If the two times are equal, the method should return 0. If the object time is less than the passed parameter, it should return -1.
만약 그 두배 평등할 경우, 그 방법 0 돌아올것이다. 만약 그 물건시간이 임종한 매개변수 이하이면, 그것은 -1 돌아올것이다.

If the object time is greater than the passed parameter, it should return 1.
만약 그 물건시간 임종한 매개변수 더 훌륭한 이면, 그것은 1 돌아올것이다.

A method should be provided that adds one time to another, and another function that subtracts one time from another.
에이 방법 1회 또하나에 첨가하는과, 그리고 또하나에게서 1회 제거하는 또하나의 수식 제공되어짐당해져야한다.

The class should not allow negative times (subtraction of more time than is currently stored should result in a time of 00:00:00).
그 계급 음수시행 결코 용서치않다. (현재 축적되어짐당한 횟수 이상의 감봉 00:00:00의 시간으로 될 것이다.)

The constructors should set all the hours, minutes, and seconds to 0 if any of the three values are out of range.
만약 세 값 중 어느하나라도 사거리 밖에 있을 경우, 그 일벌레 모든 시간, 분, 그리고 후처들 0으로 두어야한다.
아이콘 아이언사이드 (2012-03-08 16:47:46 KST)
0↑ ↓0
센스 이미지
ㄴWaldo!
아이콘 GreenLantern (2012-03-08 17:00:00 KST)
0↑ ↓0
센스 이미지를 등록해 주세요
흑인경비원//하얀건 플엑 바탕임다 (....뭐?)
아이콘 서쪽의술 (2012-03-08 17:09:23 KST)
0↑ ↓0
센스 이미지
여기에 질문을 한것이 당신의 가장 큰 실수였다!
댓글을 등록하려면 로그인 하셔야 합니다. 로그인 하시려면 [여기]를 클릭하십시오.
롤토체스 TFT - 롤체지지 LoLCHESS.GG
소환사의 협곡부터 칼바람, 우르프까지 - 포로지지 PORO.GG
배그 전적검색은 닥지지(DAK.GG)에서 가능합니다
  • (주)플레이엑스피
  • 대표: 윤석재
  • 사업자등록번호: 406-86-00726

© PlayXP Inc. All Rights Reserved.