
Java 读取数据储存数据
不会做作业,谁帮我做下啊有一个ClassAddress,ClassAddressBook,Address.txtClassAddress中有firstName,lastN...
不会做作业,谁帮我做下啊
有一个Class Address, Class AddressBook,Address.txt
Class Address 中有firstName, lastName,
streetAddress, city, province, postalCode, country, phoneNumber, and emailAddress.
Class AddressBook 中有一个ArraryList<Address>和addAddress(),deletAddress()
Address.txt 中有xml形式的3个不同人的信息。
像这样 <address>
<firstName
Peter
</firstname>
<lastName>
Mohr
</lastName>
问题是在一个class中写2个method
Write another class called AddressParser.java that must have the following:
An object of AddressBook class.
A method that will take a file name (String type) as a parameter, parse the file, create an
object of Address class for each address in the file and add the created object to the object
of AdressBook.
Another method that will take two parameters one is of AddressBook class and the other
is of type String for file name. The task of the method is to save each address from the
parameter of AddressBook class to the file passed as the other parameter. The address
will be saved to the file in xml format. 展开
有一个Class Address, Class AddressBook,Address.txt
Class Address 中有firstName, lastName,
streetAddress, city, province, postalCode, country, phoneNumber, and emailAddress.
Class AddressBook 中有一个ArraryList<Address>和addAddress(),deletAddress()
Address.txt 中有xml形式的3个不同人的信息。
像这样 <address>
<firstName
Peter
</firstname>
<lastName>
Mohr
</lastName>
问题是在一个class中写2个method
Write another class called AddressParser.java that must have the following:
An object of AddressBook class.
A method that will take a file name (String type) as a parameter, parse the file, create an
object of Address class for each address in the file and add the created object to the object
of AdressBook.
Another method that will take two parameters one is of AddressBook class and the other
is of type String for file name. The task of the method is to save each address from the
parameter of AddressBook class to the file passed as the other parameter. The address
will be saved to the file in xml format. 展开
2个回答
展开全部
你这学生,你是学习编程的,有困难怎么让别人做了呢,你应该这么问,要解决你这个问题有什么好的办法,然后大家给你一些方法后,你自己去写,这样你才会有提高呀
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询