Java 包含输入和输出到.dat文件的编程赋值
这是我编程课上这周的作业。我知道我需要往哪个方向走,但一些具体细节让我感到困惑Java 包含输入和输出到.dat文件的编程赋值,java,file,input,output,createfile,Java,File,Input,Output,Createfile,这是我编程课上这周的作业。我知道我需要往哪个方向走,但一些具体细节让我感到困惑 My Credit Card Company has a file that called “BeginningBalance.dat” which contains the following information: Customer number->integer Beginning Balance->double Purchases->double Payments->double
My Credit Card Company has a file that called “BeginningBalance.dat” which
contains the following information:
Customer number->integer
Beginning Balance->double
Purchases->double
Payments->double
The company charges 1% of the beginning balance for finance charges.
Write a Java program that does the following:
Read in the file, calculates the finance charge per customer
Display all information to the monitor including finance charge and
outstanding balance • Creates an output file called “NewBalance.dat” that
contains customer number and new balance.
所以我想我需要创建开始文件,将其读入Java,将数据传递到数组并显示,计算新数据并将其输出到新文件。我只是不知道该怎么开始。任何事情都会有帮助,非常感谢。一种方法是写作code@MartinČuka感谢您提供的有用信息。很高兴你这么欢迎。欢迎:-)尝试使用
DataInputStream
读取.dat文件。我建议使用Scanner
读取.dat文件一种方法是通过编写code@MartinČuka感谢您提供的有用信息。很高兴你这么欢迎。欢迎:-)尝试使用DataInputStream
读取.dat文件。我建议使用Scanner
读取.dat文件