One idea
A class should represent one real thing in your app. An interface should represent one action your app can swap or improve later.
For a recruiter CLI, Candidate and Job are classes. MatchScorer is an interface because matching can change from simple keywords to a better scoring rule.
Why this matters
A project repo looks stronger when your code is not one long Main.java file. Recruiter apps have clear nouns: candidate, job, skill, application, score.
When each idea has its own class, another builder can open your repo and understand it fast. This also helps later lessons when you add files, JSON, streams, and a build tool.
Choose your classes
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done
Candidate class
Start with a small class. Do not add every profile field from LinkedIn. Add what your CLI will show or use.
This class stores data and has one useful method: checking if the candidate has a skill.
import java.util.List;
public class Candidate {
private final String name;
private final String email;
private final List<String> skills;
private final int experienceMonths;
public Candidate(String name, String email, List<String> skills, int experienceMonths) {
this.name = name;
this.email = email;
this.skills = skills;
this.experienceMonths = experienceMonths;
}
public String getName() {
return name;
}
public String getEmail() {
return email;
}
public List<String> getSkills() {
return skills;
}
public int getExperienceMonths() {
return experienceMonths;
}
public boolean hasSkill(String skill) {
return skills.contains(skill);
}
}Job class
A job also has data. Keep it focused on matching candidates in your CLI.
For an Indian campus project, a stipend or salary field can be useful, but only add it if your app uses it.
import java.util.List;
public class Job {
private final String title;
private final String company;
private final List<String> requiredSkills;
public Job(String title, String company, List<String> requiredSkills) {
this.title = title;
this.company = company;
this.requiredSkills = requiredSkills;
}
public String getTitle() {
return title;
}
public String getCompany() {
return company;
}
public List<String> getRequiredSkills() {
return requiredSkills;
}
}Interface for scoring
Do not hard-code matching inside Main. Put the matching rule behind an interface.
Later you can replace keyword scoring without changing the rest of the CLI.
public interface MatchScorer {
int score(Candidate candidate, Job job);
}
public class SkillMatchScorer implements MatchScorer {
@Override
public int score(Candidate candidate, Job job) {
int score = 0;
for (String skill : job.getRequiredSkills()) {
if (candidate.hasSkill(skill)) {
score = score + 10;
}
}
return score;
}
}Common mistake
Beginners often put input, printing, data, and matching in one file. It works for a demo, but it becomes hard to change before a hackathon submission.
Keep Main for running the CLI. Put business ideas in classes. Put changeable rules behind interfaces.
Do this now
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done