Skip to content

create oop example#3

Open
KYehor wants to merge 1 commit into
oleksandr-kazimirov:v3from
KYehor:master
Open

create oop example#3
KYehor wants to merge 1 commit into
oleksandr-kazimirov:v3from
KYehor:master

Conversation

@KYehor
Copy link
Copy Markdown

@KYehor KYehor commented Jul 9, 2019

No description provided.

}

@Override
public Value getValue() {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currency


public class CountingProfessor implements Accounting<Professor,Value> {

private String salary;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this?


public class CountingStudent implements Accounting<Student,Value> {
private String salary;
private int sal = 800;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name is not clear

@Override
public void printData() {
System.out.println("I'm an extramural student: " + this.getName());
}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is toString for this

public class CountingProfessor implements Accounting<Professor,Value> {

private String salary;
private int sal = 500;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KYehor, variable sal is never used


public CountingProfessor(){
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KYehor, don`t create an empty constructor if you never use it

package com.company;

public class ExtramuralStudent extends Student {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KYehor, class has no variables

Comment thread src/com/company/Faculty.java Outdated
@@ -0,0 +1,14 @@
package com.company;

public class Faculty extends University{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KYehor, Faculty is not University, University has a Faculty

Comment thread src/com/company/ExtramuralStudent.java Outdated
public class ExtramuralStudent extends Student {

public static void printAboutStudent(){
System.out.println("Hello,i'm an extramural student.");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KYehor, check java general convention regarding methods ordering in class

countingStudent = new CountingStudent();
}

public void getSal(Student student,int sal){
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KYehor, method "get" should return something

@@ -0,0 +1,10 @@
package com.company;

public class StudentRecordBook {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KYehor, class should not be without methods

Comment thread src/com/company/Professor.java Outdated
public class Professor extends UniversityPerson {

public Professor(){
numbOfUP++;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is it ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is it ?
Just for calculate numbers of university persons.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name is not clear

@oleksandr-kazimirov
Copy link
Copy Markdown
Owner

Please, make one commit for this PR

@KYehor KYehor force-pushed the master branch 4 times, most recently from 87b9059 to 04595b7 Compare July 12, 2019 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants