Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DRAW A UML CLASS DIAGRAM FOR THE CODE BELOW #will rate highly i need this asap import java.io.*; import java.util.ArrayList; import java.util.Scanner; public class process

DRAW A UML CLASS DIAGRAM FOR THE CODE BELOW #will rate highly i need this asap import java.io.*; import java.util.ArrayList; import java.util.Scanner; public class process { public static void createAddNewPerson( Scanner input){ System.out.print("Enter Licience ID: "); String id=input.next(); System.out.print("Enter Licience Name: "); String name=input.next(); System.out.print("Enter Stall Name: "); String stall=input.next(); System.out.print("Enter Product: "); String product=input.next(); System.out.print("Enter Lot Number: "); String lot=input.next(); Person person=new Person(id,name,stall,product,lot); try { FileWriter writer = new FileWriter(id +".txt", true); writer.append(person.getUserData()); writer.append(" "); writer.close(); System.out.println(stall + " Stall Added Succefully!"); } catch (IOException e) { System.out.println(e); } } public static void deleteRecordById(ArrayList arrayList,Scanner input){ try { System.out.print("Enter Licience ID : "); String id=input.next(); FileWriter writer=new FileWriter(id +".txt"); for (int i=0;iarrayList,Scanner input){ System.out.print("Enter Licience ID :"); String searchKey=input.next(); try { BufferedReader reader=new BufferedReader(new FileReader(searchKey +".txt")); //String searchKey=input.next(); String line; while ((line=reader.readLine())!=null){ if( line.contains(searchKey)){ System.out.print("What word you want to update: "); String oldValue=input.next(); System.out.print("New word: "); String newValue=input.next(); arrayList.add(line.replace(oldValue,newValue)); }else { arrayList.add(line); } } }catch (Exception e){ System.out.println(e); } try { FileWriter writer=new FileWriter(searchKey +".txt"); for(int i=0;i                        
                                            
                    

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Icdt 88 2nd International Conference On Database Theory Bruges Belgium August 31 September 2 1988 Proceedings Lncs 326

Authors: Marc Gyssens ,Jan Paredaens ,Dirk Van Gucht

1st Edition

3540501711, 978-3540501718

More Books

Students also viewed these Databases questions