-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pull Request #19
base: master
Are you sure you want to change the base?
Pull Request #19
Conversation
Assignment2/src/Main.java
Outdated
public static void main(String[] args) | ||
{ | ||
//String studentRecFileName = fileReadWriteUtil.getFile(); // extract and read student file from memory | ||
//List<Student> studentRecordList = fileReadWriteUtil.readFile("studentData.txt"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused comments.
Assignment2/src/Main.java
Outdated
//String studentRecFileName = fileReadWriteUtil.getFile(); // extract and read student file from memory | ||
//List<Student> studentRecordList = fileReadWriteUtil.readFile("studentData.txt"); | ||
|
||
int choice = utility.getInputItemChoice(); // menu for selecting options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming convention for static classes needs to be followed.
Assignment2/src/Main.java
Outdated
//List<Student> studentRecordList = fileReadWriteUtil.readFile("studentData.txt"); | ||
|
||
int choice = utility.getInputItemChoice(); // menu for selecting options | ||
utility.performAction(choice); // perform task according to the option chosen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If utility is a static class, should it be tightly coupled with the behavior of Student.
Assignment2/src/model/Course.java
Outdated
|
||
public class Course implements Serializable{ | ||
// private static final long serialVersionUID =1L; | ||
ArrayList<String> courses; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are access modifiers required ?
return rollNumber; | ||
} | ||
|
||
public void setRollNumber(int rollNumber) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Access modifiers are missing .... PMD should have broken here.
if (studentList.isEmpty()) { | ||
System.out.println("No user details present\n"); | ||
} | ||
studentList=sortByChoice(studentList, choice); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checkstyle ???
if (studentList.isEmpty()) { | ||
System.out.println("No user details present\n"); | ||
} | ||
studentList=sortByChoice(studentList, choice); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If true, should it still proceed ???
System.out.println("User Details : \n"); | ||
System.out.printf("%s %s %s %s %s %n \n", "Name", "Age", "Address", "Roll Number", "Courses"); | ||
|
||
for (Student value : studentList) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look into java streams for iterating.
<exclude-output /> | ||
<content url="file://$MODULE_DIR$"> | ||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | ||
</content> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
look into .gitignore for making sure unwanted files aren't committed.
Assignment2/src/util/utility.java
Outdated
System.out.print("Do you want to CONTINUE? Enter (y/n): "); | ||
String choice = sc.next(); | ||
int inputChoice = 0; | ||
if ("Y".equals(choice) || "y".equals(choice)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer to use constants for such hard coded string.
No description provided.