Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Practice: Using java, take the given Meeting Scheduler System(MSS) program and i

ID: 3813687 • Letter: P

Question

Practice:

Using java, take the given Meeting Scheduler System(MSS) program and implement it using a GUI (No Command Line).

Guidelines:

1. Your application should have a GUI. All interaction should be through the GUI. The command line should never be used.

2. At any time, the user should be able to save all the information on a file.

3. When a program start the user can upload all the information from a file

MeetingScheuler.Java

public class MeetingScheduler {
  
private static int getMeetingsCount(HashMap<Integer, Room> rooms,Participant p,int slot)//checks to see how many meetings a participant has scheduled
{
Room r;
Meeting m;
ArrayList<Meeting> meetings=new ArrayList<Meeting>();
  
for(Integer k:rooms.keySet())
{
r=rooms.get(k);
m=r.getMeeting(slot);
if(m!=null && m.hasParticipant(p))
meetings.add(m);
}
  
return meetings.size();
  
}
  
public static void main(String[] args) {
int choice,num,slot,room;
String fname,lname,phone,mname,ans="";
Participant p;
Room r;
Meeting m;
Scanner scanner=new Scanner(System.in);
HashMap<Integer, Room> rooms= new HashMap<Integer,Room>();
HashMap<String, Participant> participants=new HashMap<String ,Participant>();//helpful data structure that uses a key to represent objects https://www.youtube.com/watch?v=c3RVW3KGIIE
HashMap<String, Meeting> meetings=new HashMap<String,Meeting>();

System.out.println("Enter the number of rooms:");
num=scanner.nextInt();
for(int i=1;i<=num;i++)
{
rooms.put(new Integer(i),new Room(i));
}
  
do//loops until 10 is entered
{
  
System.out.println("1. Add Participant");
System.out.println("2. Delete Participant");
System.out.println("3. Add Meeting");
System.out.println("4. Delete Meeting");
System.out.println("5. Add Room");
System.out.println("6. Delete Room");
System.out.println("7. Display all meetings ");
System.out.println("8. Display meetings in a room");
System.out.println("9. Display meetings by participant");
System.out.println("10. Exit");
System.out.println("Enter your choice: ");
choice=scanner.nextInt();

switch (choice)//switch statement for options
{
case 1: //add participant
System.out.println("Enter first name: ");
fname=scanner.next();
System.out.println("Enter last name: ");
lname=scanner.next();
System.out.println("Enter phone number: ");
phone=scanner.next();
p=new Participant(fname,lname);
p.setPhone(phone);
participants.put(p.getName(),p);
break;
case 2: //delete participant
System.out.println("Enter the details of the participant to be deleted");
System.out.println("Enter first name: ");
fname=scanner.next();
System.out.println("Enter last name: ");
lname=scanner.next();
p=participants.get(fname.toUpperCase()+" "+lname.toUpperCase());
if(p==null)//participant does not exist
System.out.println("Participant "+fname+" "+lname+" does not exist!");
else//participant exists
{
for(int i=0;i<rooms.size();i++)
{
r=rooms.get(i);
if(r.getNumMeetings()==0)
continue;
else
{
if(r.isAttending(p))//participant is in meeting
{
System.out.println("Participant "+p.getName()+" is participating in 1 or more meetings and can not be deleted!");
  
}
else//if participant not in meeting
{
participants.remove(p.getName());
System.out.println("Deleted participant successfully.");
}
}
}
}
break;
case 3: //add meeting
System.out.println("Which slot hour do you want to schedule (9-17 hrs): ");
slot=scanner.nextInt();
System.out.println("Which room? : ");
  
room=scanner.nextInt();
System.out.println("Meeting name: ");
mname=scanner.next();
  
if((r=rooms.get(room)).isSlotAvailable(slot))//room is open
{
m=new Meeting(mname);
m.setRoom(r);
m.setStartHour(slot);
r.addMeeting(m);
meetings.put(m.getName(), m);
  
System.out.println("Wish to add participants yes/no ? : ");
ans=scanner.next();
  
  
  
while(ans.equalsIgnoreCase("yes"))//if user wants to add participant
{
System.out.println("First name: ");
fname=scanner.next();
System.out.println("Last name: ");
lname=scanner.next();
p=participants.get(fname.toUpperCase()+" "+lname.toUpperCase());
if(p==null)//desired particpant does not exist
{
System.out.println("No such participant!");
continue;
  
}
else//desired participant exists
{
  
if(getMeetingsCount(rooms, p, slot)==0)//participant is free
m.addParticipant(p);
else//participant is busy
{
System.out.println("Participant "+p.getName()+" has to attend another meeting at time "+slot+" hours.");
}
  
}
System.out.println("Add another participant yes/no ? : ");
ans=scanner.next();
  
}
  
  
  
System.out.println("Meeting "+m.getName()+" added successfully");
}
else// room not open
{
System.out.println("Room No. "+room+" is not available for "+slot+" hours");
}
  
break;
case 4: //delete meeting
System.out.println("Enter meeting name: ");
mname=scanner.next();
m=meetings.get(mname);
if(m==null)//desired meeting does not exist
{
System.out.println("No such meeting !");
}
else//desired meeting exists
{
if(m.getNumParticipants()==0)//no participants in meeting, delete
{
r=rooms.get(m.getRoom().getRoomNum());
r.cancelMeeting(m.getStartHour());
meetings.remove(m.getName());
System.out.println("Meeting "+m.getName()+" successfully deleted!");
  
}
else//participants in meeting, dont delete
{
System.out.println("Meeting "+m.getName()+" has some participants ! Cannont delete! ");
}
}
break;
case 5: //add room
System.out.println("Enter room no: ");
room=scanner.nextInt();
if(rooms.get(room)==null)//if room doesn't exist, create
{
r=new Room(room);
rooms.put(room,r);
System.out.println("Room no."+room+" successfully created.");
}
else//room already exists
{
System.out.println("Room already exists!");
}
  
break;
case 6: //delete room
System.out.println("Enter room no: ");
room=scanner.nextInt();
if((r=rooms.get(room))==null)//room does not exist
{

System.out.println("Room no."+room+" does not exist!");
}
else//room exists
{
if(r.getNumMeetings()!=0)//if meetings are scheduled, no delete
{
System.out.println("Room "+room+" cannot be deleted as some meetings are scheduled!");
}
else//if no meetings scheduled, delete
{
rooms.remove(room);
System.out.println(" ");
}
}
break;
case 7: //meetings for the day
System.out.println("Meetings for the day:");
for(Integer k:rooms.keySet())
{
r=rooms.get(k);
if(r.getNumMeetings()!=0)
r.displayMeetings();
}
  
break;
case 8: //meetings in a room
System.out.println("Enter room no: ");
room=scanner.nextInt();
r=rooms.get(room);
if(r==null)//room does not exist
{
System.out.println("No such room");
}
else//room exists, display meetings
{
r.displayMeetings();
}

break;
case 9: //meetings by a participant
System.out.println("Enter participant first name: ");
fname=scanner.next();
System.out.println("Enter participant last name: ");
lname=scanner.next();
p=participants.get(fname.toUpperCase()+" "+lname.toUpperCase());
if(p==null)//participant does not exist
System.out.println("No such participant!");
else//participant exists
{
System.out.println("Meeting by participant : "+p.getName());
ArrayList<Meeting> ms;
for(Integer k:rooms.keySet())
{
r=rooms.get(k);
  
if(r.getNumMeetings()!=0)
{
ms=r.getMeetings(p);
if(!ms.isEmpty())
{
System.out.println("Room No: "+r.getRoomNum());
for(int i=0;i<ms.size();i++)
System.out.print(" "+ms.get(i).getName()+" at "+ms.get(i).getStartHour()+" hours");
}
}
}
}

break;
case 10://exits program
break;
default://invalid choice
System.out.println("Invalid menu choice!");
}
System.out.println("_______________");//aesthetic
  
  
}while(choice!=10);
  
scanner.close();
}

}

Participant.Java

public class Participant {
  
private String firstName;
private String lastName;
private String phone;

public Participant(String fname,String lname)//constructor
{
firstName=fname.toUpperCase();//eliminates confusion from user input
lastName=lname.toUpperCase();
}
public String getFirstName() {
return firstName;
}

public String getLastName() {
return lastName;
}

public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getName()
{
return firstName+" "+lastName;
}
}

Room.Java

public class Room {
private int roomNo;
private Meeting meetings[];
private int count;

public Room(int num)//constructor
{
roomNo=num;
//9 slots for meetings starting from 9:00 hr , 10:00....5:00hr
  
meetings=new Meeting[9];
count=0;
}
public int getRoomNum()
{
return roomNo;
}

public boolean addMeeting(Meeting meeting)//adds a meeting
{
int startHour=meeting.getStartHour();
//meetings can be from 9 to 5
if(startHour<9 || startHour>17)
return false;

int index=startHour-9; //caluclate what this meeting index is. 9:00 will be at index 0, 10:00 at index 1 and so on

if(meetings[index]==null) //if no other meetings is assigned already
{
meetings[index]=meeting;
count++;
return true;
  
}
else
return false;
}
  
public boolean isSlotAvailable(int startHour)//determines if meeting can be scheduled at this hour
{
if(startHour<9 || startHour>17)
return false;
int index=startHour-9; //caluclate what this meeting index is. 9:00 will be at index 0, 10:00 at index 1 and so on
return (meetings[index]==null);
}
  
public boolean cancelMeeting(int startHour)//delete meeting
{
//meetings can be from 9 to 5
if(startHour<9 || startHour>17)
return false;
int index=startHour-9; //caluclate what this meeting index is. 9:00 will be at index 0, 10:00 at index 1 and so on
if(meetings[index]==null)
{
return false;
}
else
{
meetings[index]=null;
count--;
return true;
}
}
  
public int getNumMeetings()
{
return count;
}
  
public Meeting getMeeting(int startHour)
{
//meetings can be from 9 to 5
if(startHour<9 || startHour>17)
return null;
int index=startHour-9; //caluclate what this meeting index is. 9:00 will be at index 0, 10:00 at index 1 and so on
return meetings[index];
}
  
public boolean isAttending(Participant p)//checks to see whos at the meeting
{
Meeting m;
for(int i=0;i<meetings.length;i++)
{
m=meetings[i];
if(m!=null)
if(m.hasParticipant(p))
return true;
  
}
return false;
}
  
public ArrayList<Meeting> getMeetings(Participant p)
{
ArrayList<Meeting> ms=new ArrayList<Meeting>();
Meeting m;
for(int i=0;i<9;i++)
{
m=meetings[i];
if(m!=null && m.hasParticipant(p))
{
ms.add(m);
  
}
}
return ms;
  
  
}
  
public void displayMeetings()//displays meetings
{
Meeting m;
System.out.println("Room No.:"+roomNo);
for(int i=0;i<9;i++)
{
m=meetings[i];
if(m!=null)
System.out.println(" "+m.getStartHour()+" Hrs: "+m.getName());
}
}
}

Meeting.Java

public class Meeting {
private String name;
private Room room;
private int startHour;
private ArrayList<Participant> participants;
  
public Meeting(String mname)//constructor
{
name=mname;
participants=new ArrayList<Participant>();
}
  
public void setRoom(Room r)
{
room=r;
}
  
public Room getRoom()
{
return room;
}
  
public boolean setStartHour(int hour)//makes sure meeting can be scheduled at this hour, then schedules it
{
if(hour<9 || hour>17)
return false;
startHour=hour;
return true;
}
  
public int getStartHour()
{
  
return startHour;
}
public String getName()
{
return name;
}
public void addParticipant(Participant p)//adds a participant
{
String name=p.getName();
for(int i=0;i<participants.size();i++)
if(participants.get(i).getName().equalsIgnoreCase(name))
return;
participants.add(p);
  
}
  
public boolean hasParticipant(Participant p)//checks if meeting has a participant
{
String name=p.getName();
for(int i=0;i<participants.size();i++)
if(participants.get(i).getName().equalsIgnoreCase(name))
return true;
  
return false;
}
  
public int getNumParticipants()
{
return participants.size();
}
  
public Participant getParticipant(int i)
{
return participants.get(i);
}
  
public boolean removeParticipant(Participant p)// delete participant
{
String name=p.getName();
for(int i=0;i<participants.size();i++)
{
if(participants.get(i).getName().equalsIgnoreCase(name))
{
participants.remove(i);
return true;
}
}
return false;
}
}

Thank you in advance, please let me know if you need more information :)

Explanation / Answer

Core banking may be a banking service provided by a gaggle of networked bank branches wherever customers could access their checking account and perform basic transactions from any of the member branch offices.

Core banking is usually related to retail banking and lots of banks treat the retail customers as their core banking customers. Businesses area unit sometimes managed via the company banking division of the establishment. Core banking covers basic depositing and disposal of cash.

Normal Core Banking functions can embody dealings accounts, loans, mortgages and payments. Banks create these services offered across multiple channels like ATMs, net banking, mobile banking and branches.[1]

The core banking services bank heavily on laptop and network technology to permit a bank to modify its record keeping and permit access from any location. it's been the event of banking software system that has allowed core banking solutions to be developed
Core banking solutions is jargon utilized in banking circles. The advancement in technology, particularly net and knowledge technology has light-emitting diode to new ways that of doing business in banking. These technologies have reduced manual add banks and increasing potency. The platform wherever communication technology and knowledge technology area unit united to suit core desires of banking is thought as core banking solutions. Here, laptop software system is developed to perform core operations of banking like recording of transactions, record maintenance, interest calculations on loans and deposits, client records, balance of payments and withdrawal. This software system is put in at totally different branches of bank then interconnected by suggests that of laptop networks supported telephones, satellite and therefore the net. It permits the banks customers to control accounts from any branch if it's put in core banking solutions.

Gartner defines a core industry as a back-end system that processes daily banking transactions, and posts updates to accounts and different monetary records. Core banking systems generally embody deposit, loan and credit-processing capabilities, with interfaces to account book systems and news tools. Core banking applications area unit usually one in every of the biggest single expense for banks and bequest software system area unit a significant issue in terms of allocating resources. Strategic defrayal on these systems relies on a mixture of service-oriented design and supporting technologies that make protractile architectures.

Many banks implement custom applications for core banking. Others implement/customize business ISV packages.[2]

While several banks run core banking in-house, there area unit some that use outsourced service suppliers yet. There area unit many Systems integrators like cognizant Technology Solutions, EdgeVerve Systems restricted, Capgemini, Accenture, IBM and TCS that implement these core banking packages at banks.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote