package com.di.quiz;

public class PointImpl implements Point{
	PointDTO dto = new PointDTO();
	
	public PointImpl(PointDTO dto) {
		super();
		this.dto = dto;
	}

	@Override
	public void calcTot() {
		dto.setTot(dto.getKor() + dto.getMath() + dto.getEng());
	}

	@Override
	public void calcAvg() {
		dto.setAvg((double) dto.getTot()/3);
	}

	@Override
	public void showPoint() {
		System.out.println("이름 : " + dto.getName());
		System.out.println("총점 : " + dto.getTot());
		System.out.println("평균 : " + dto.getAvg());
	}
	
}