Posts

Showing posts from June, 2025

Solution7

  package pone; import java.util.*; class Fairy { private String fairyName ; private String talentType ; private double energyLevel ; private int noOfDays ; private ArrayList<Integer> dailyTasks ; public Fairy(String fairyName,String talentType, double energyLevel, int noOfDays,ArrayList<Integer> dailyTasks) { this . fairyName = fairyName; this . talentType = talentType; this . energyLevel = energyLevel; this . noOfDays = noOfDays; this . dailyTasks = dailyTasks; } public String getFairyName() { return fairyName ; } public Fairy setFairyName(String fairyName) { this . fairyName = fairyName; return this ; } public String getTalentType() { return talentType ; } public Fairy setTalentType(String talentType) { this . talentType = talentType; return this ; } public double getEnergyLevel() { return energyLevel ; ...

Solution6

  package pone; import java.util.*; class Observatory { private String obervatoryName ; private double telescopePower ; private int yearsOperational ; private ArrayList<String> observedPhenomena ; public Observatory(String obervatoryName, double telescopePower, int yearsOperational,ArrayList<String> observedPhenomena) { this . obervatoryName = obervatoryName; this . telescopePower = telescopePower; this . yearsOperational = yearsOperational; this . observedPhenomena = observedPhenomena; } public String getObervatoryName() { return obervatoryName ; } public Observatory setObervatoryName(String obervatoryName) { this . obervatoryName = obervatoryName; return this ; } public double getTelescopePower() { return telescopePower ; } public Observatory setTelescopePower( double telescopePower) { this . telescopePower = telescopePower; return th...

Solution5a

  /* package pone; import java.util.*; public class Solution5a { public static void main(String[] args) { Scanner xx = new Scanner(System.in); MoviesService yy = new MoviesService(); int a = xx.nextInt(); xx.nextLine(); ArrayList<Movies> mov = new ArrayList<>(); for (int i = 0; i < a; i++) { int movieId = xx.nextInt(); xx.nextLine(); String movieName = xx.nextLine(); int movieRating = xx.nextInt(); xx.nextLine(); int numberOfActor = xx.nextInt(); xx.nextLine(); List<String> actors = new ArrayList<>(); for (int j = 0; j < numberOfActor; j++) { String aname = xx.nextLine(); actors.add(aname); } mov.add(new Movies(movieId, movieName, movieRating, numberOfActor, actors)); } String ActorName1 = xx.nextLine(); String A...

Solution5

  package pone; import java.util.*; class Movies { private int movieId ; private String movieName ; private int movieRating ; private int numberOfActors ; private ArrayList<String> actors ; public Movies( int movieId,String movieName, int movieRating, int numberOfActors,ArrayList<String> actors) { this . movieId = movieId; this . movieName = movieName; this . movieRating = movieRating; this . numberOfActors = numberOfActors; this . actors = actors; } public int getMovieId() { return movieId ; } public Movies setMovieId( int movieId) { this . movieId = movieId; return this ; } public String getMovieName() { return movieName ; } public Movies setMovieName(String movieName) { this . movieName = movieName; return this ; } public int getMovieRating() { return movieRating ; } public Movies setMovieRating( i...

Solution4

  package pone; import java.util.*; class Orders { private int orderId ; private String orderName ; private int noOfProducts ; private ArrayList<String> products ; private ArrayList<Integer> quantities ; public Orders( int orderId,String orderName, int noOfProducts,ArrayList<String> products,ArrayList<Integer> quantities) { this . orderId = orderId; this . orderName = orderName; this . noOfProducts = noOfProducts; this . products = products; this . quantities = quantities; } public int getOrderId() { return orderId ; } public Orders setOrderId( int orderId) { this . orderId = orderId; return this ; } public String getOrderName() { return orderName ; } public Orders setOrderName(String orderName) { this . orderName = orderName; return this ; } public int getNoOfProducts() { return noOfProducts ; ...

Solution3

  package pone; import java.util.*; class Unit { private int unitId ; private String unitName ; private int budget ; private ArrayList<Employee> employ ; public Unit( int unitId,String unitName, int budget,ArrayList<Employee> employ) { this . unitId = unitId; this . unitName = unitName; this . budget = budget; this . employ = employ; } public int getUnitId() { return unitId ; } public Unit setUnitId( int unitId) { this . unitId = unitId; return this ; } public String getUnitName() { return unitName ; } public Unit setUnitName(String unitName) { this . unitName = unitName; return this ; } public int getBudget() { return budget ; } public Unit setBudget( int budget) { this . budget = budget; return this ; } public ArrayList<Employee> getEmploy() { return employ ; } publ...

Solution2

  package pone; import java.util.*; class Customer1 { private int customerId ; private String Name ; private int noofCycles ; private ArrayList<Cycle> cycle ; public Customer1( int customerId,String Name, int noofCycles,ArrayList<Cycle> cycle) { this . customerId = customerId; this . Name = Name; this . noofCycles = noofCycles; this . cycle = cycle; } public int getCustomerId() { return customerId ; } public Customer1 setCustomerId( int customerId) { this . customerId = customerId; return this ; } public String getName() { return Name ; } public Customer1 setName(String name) { Name = name; return this ; } public int getNoofCycles() { return noofCycles ; } public Customer1 setNoofCycles( int noofCycles) { this . noofCycles = noofCycles; return this ; } public ArrayList<Cycle> getCycl...

Solution1

  package pone; import java.util.*; class Customer { private int customerId ; private String name ; private int age ; private String gender ; private ArrayList<Perfume> availablePerfumes ; public Customer( int customerId,String name, int age,String gender, ArrayList<Perfume> availablePerfumes) { this . customerId = customerId; this . name = name; this . age = age; this . gender = gender; this . availablePerfumes = availablePerfumes; } public int getCustomerId() { return customerId ; } public Customer setCustomerId( int customerId) { this . customerId = customerId; return this ; } public String getName() { return name ; } public Customer setName(String name) { this . name = name; return this ; } public int getAge() { return age ; } public Customer setAge( int age) { this . age = age; re...