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

Java Program: Arrays Of Marks
Homework Solution
$30.00
Java
Programming
Codes
Computer Science
Algorithms
Arrays
Marks
Characters
Strings
Integers
Maximum Value
Minimum Value
Difference
Range
Median
Sorting Methods
Boundaries
Statements
Vaariables
Java Program With Lists & Integers
Homework Solution
$40.00
Java
Programming
Codes
Algorithms
Linked Lists
File Management
Data Structures
Libraries
Scanner
Zero Sum Subset
Input
Output
Statements
Variables
Positive Integers
Negative Integers
Binary Mask
Pseudo-Codes
Java Programming Problems
Homework Solution
$50.00
Computer Science
Java Programming
Algorithms
Loops
Data
Graphic Dialog Box
Objects
Classes
Statements
Variables
Inventory
Input
Output
Verification
File Management
Items
Java Programming Problems
Homework Solution
$30.00
Java
Programming
Computer Science
Arrays
Fractions
Variables
Strings
Numerator
Denominator
Statements
Constructor
Object
Initialization
Generic Method For Java Arrays
Homework Solution
$20.00
Java
Programming
Coding
Computer Science
Arrays
Items
Generic Method
Integers
WordList
Strings
Testing
Primitive Types
Input
Output
Matrix Problem in Java
Homework Solution
$13.00
Java
Programming
Coding
Computer Science
Matrix
Diagonals
Input File
Output File
Integers
Loops
Conditions
Statements
Swapping Numbers
Random Values
Variables
Get help from a qualified tutor
Live Chats