Subject Computer Science Java Programming

Question

Consider the application for booking meeting rooms. Create a program to keep track of contacts. For each person to save a name and phone number. The program will have graphic user interface, and store information on file. Program code is provided on a single text file (. Txt). Separate classes clearly.

Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

mport java.io.*;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;


public class MeetingRoom {

public Map<String, String> names;

public MeetingRoom()
{
names = new HashMap<String, String>();
try(BufferedReader out = new BufferedReader(new FileReader("contacts.txt")))
{
String line;
while((line = out.readLine()) != null)
{
String[] split = line.split("\\s+");
names.put(split[0], split[1]);
}
} catch (IOException e) {
return;
}
}

public boolean addEntry(String name, String phoneNumber)
{
if(!names.containsKey(name))
{
names.put(name, phoneNumber);
return true;...

This is only a preview of the solution. Please use the purchase button to see the entire solution

Related Homework Solutions

Gradebook Using Java Programming
Homework Solution
$20.00
Java
Programming
Computer Science
Random Numbers
Scores
Students
Input
Output
Loops
Statements
Conditions
Average Values
Variables
Mathematics
Maze Problem in Java
Homework Solution
$50.00
Java
Programming
Codes
Algorithms
Maze Problem
Classes
Constructor
Stack
Positions
Points
Push
Pop
Symbols
Statements
Variables
Rows
Columns
Strings
Integers
Commands
Pseudo-Code
Get help from a qualified tutor
Live Chats