Java files
i want to get an example on how to develop a Java OO application which reads, analyses, sorts, and displays student project marks. In particular, the application should do the following:
1. Load a list of student mark records from a plain-text file in Comma-separated-
value (CSV) format. The input files are structured as follows:
ˆ one student record per line
ˆ all lines starting with a hash symbol (#) are comments and should be
ignored by the application
ˆ the first field is the student number
ˆ the second field is a timestamp in a long format
(as used by e.g. System.currentTimeMillis())
ˆ the last field is a string comment
ˆ all other fields are student marks in float format. Note that the number
of marks may be different for each student record (i.e. line)
The name of the CSV file to read must be given on the command line (the user
should not be asked for it)
2. All student records should be parsed from the file, and kept in appropriate
objects (e.g. a Marks class) within your application
3. The application should output the following in a properly formatted list:
(a) student number
(b) minimum mark of each student
(c) maximum mark of each student
(d) average mark of each student
4. Based on a second command-line parameter, the above list should be sorted
according to different criteria:
Char in 2nd paramameter Sort Order
S Sorted ascending by student number
s Sorted decending by student number
M Sorted ascending by average marks
m Sorted decending by average marks
N Sorted ascending by the number of different marks available
n Sorted decending by the number of different marks available
If the second command-line parameter contains more than one of the above
characters, those should be used as primary, secondary, tertiary, etc. sorting keys according to the order in which they were given. the whole system must make use of polymophism
View Answers
November 11, 2010 at 1:41 AM
Ramu 35,45,55
sudher 20,45,56
....
...
This data in text file
how to read the data this one and calclate each person
and send the result in another file
like Ramu pass 55%
sudher fail
using JAVA How to write the program
Related Tutorials/Questions & Answers:
java files - Java Beginnersjava files Hi!
How to create
files (not temporary) when i got exception in my
java program.
I want to write the complete exception in file...://www.roseindia.net/
java/example/
java/io/
Thanks
Java files - Java BeginnersJava files i want to get an example on how to develop a
Java OO application which reads, analyses, sorts, and displays student project marks.... The input
files are structured as follows:
one student record per line
?
Advertisements
java and files - Java Beginnersjava and files hi
this is varun working for a software company.
i have one doubt that is
i have written a program for accessing the xml file from
java code,its get executed for that i have used XML Prser.
but now
Reading files in Java suggest for Reading
files in
Java?
Thanks...Reading
files in Java I have to make a program in my project... file in
Java. What is the best way to read the file in
Java as its big file
Copy Files - Java BeginnersCopy Files I saw the post on copying multiple
files (http://www.roseindia.net/
java/example/
java/io/CopyMultipleFiles.shtml) and I have something... a list of JPEG
files that my boss gave me, and I was planning on putting them
files - Java Beginnersfiles Why do we require
files to store data? Hi friend,
files to store data, easy to find and access them.
Thanks
configuration files - Java Beginnersconfiguration files i have to use configuration file in my program "listing of number of
files and their modified time of directory",but problem is that directory name should be provided through configuratin file not input
listing files - Java Beginnerslisting files how to list the
files and number of
files only...]);
System.exit(0);
default : System.out.println("Multiple
files...]);
System.exit(0);
default : System.out.println("Multiple
files are not allow
files.
Please visit the following link:
http://www.roseindia.net/tutorial/
java/core/
files/storeobjectsinFile.html
filesfiles write a
java program to calculate the time taken to read a given number of
files. file names should be given at command line.
Hello Friend,
Try the following code:ADS_TO_REPLACE_1
import java.io.*;
import
using java files - Java Beginnersusing
java files how i use
files in
java to store
as eg. (information about movies as its name) & when user ask about some movie the movie will come with a picture associated with it
plz write me a couple of line codes
Java Concatenate filesJava Concatenate
files
In this section, you will learn how to concatenate
files in
java.
Concatenating a file, or a series of
files, to a single file... have listed the
files using listFile()
from a particular directory
regarding java files genarated by jspregarding
java files genarated by jsp Hi,...
I'm running a project...: 233 in the generated
java file
Syntax error, insert "}" to complete Block"
Where to find the genarated
java file???
Thank u in advance
Filter Files in Java
Filter
Files in
Java
Introduction
The Filter File
Java example code provides the following functionalities:
Filtering the
files depending on the file
Reading and Writing files - Java BeginnersReading and Writing files Hello,
please help me to Develop a simple
Java application that, when run, Welcomes the users and tells them the name... to investigate writing to
files a little (can be also done using Properties
Reading Files and Print - Java BeginnersReading
Files and Print Hey Guys,
I'm a beginner to
java and I wanna write this program. I wanna create
files including information.... There are almost 30
files.
When I want to find students whose school is "School
how to backup files and folder with Javahow to backup
files and folder with Java Does anyone know to create a backup with
java?. backup
files and folders from my computer to an external drive.
hi friend,
Try the following code may, this will be helpful
list files only - Java Beginnerslist
files only i have to list only
files and number of
files in a directory?
i use list() method but it returns both
files and directories in parent directory.are there any specific methods that show only
files?
are file
java-select dynamic files. - Java Beginnersjava-select dynamic
files. My
java program is processed
files. Now i... in run time. How to insert new
files in run time.
I need to take system file.(file -> open ) I want to this windows in my
java project. Hi
File handling in Java, Java FilesJava File Handling Tutorials
In this tutorial we are providing many different examples of handling file
from
Java program. The
Java File Handling Tutorials will help you learning the
file handling concepts in
Java.
The
Java Running Batch files in java - Java BeginnersRunning Batch
files in java Hi,
I am writing a program which... and every line from the batch file and execute it line by line in
java.
Is anyone... are sending you some sample program code for running batch (.bat) file in
Java. We have
Java programming help with files - Java BeginnersJava programming help with files I want a code or the following... then forms two
files to store the data; an american employees file and a non-american employees file.
The program finally opens the
files for output and prints
Append winword files in java - Java BeginnersAppend winword
files in java HI,
Im trying to merge 2 winword documents containing text, tables and pictures, resulting doc file should have the same formatting as in original docs. My platform is windows XP and office
setting path problem for org.jfree files - Java Beginners\
Java\j2sdk1.5.0\bin;C:\Program
Files\
Java\j2sdk1.5.0\lib\jcommon-1.0.8.jar;C:\Program
Files\
Java\j2sdk1.5.0\lib\jfreechart-1.0.4-demo.jar;.
and when iam... have downloaded two
files jar
files and placed them in lib folder to work
Java to extract info from .iCalendar filesJava to extract info from .iCalendar files I need to write a
java program that will extract information (events) from .ics
files, such as those used in iCalendar, into HTML format. I started by creating string instance variables
How to convert multiple files in java to .zip formatHow to convert multiple
files in
java to .zip format i receive multiple
files from a remote URL as
for (String reportid : reportList...://Answers//Examples");
File[]
files = folder.listFiles();
File file=new File
Java JAR Files
Java JAR
Files
... (or
Java ARchive) is used for aggregating
many
files into one. It is generally used... aRchive)
files store XML
files,
java
classes, JavaServer Pages and other objects
Java count files in a directoryJava count
files in a directory
In this section, you will learn how to count only
files in a directory.
You have learnt various file operations. Here we are going to find out the
number of
files from a directory. You can see
Java list filesJava list
files
In this section, you will learn how to display the list of
files from a
particular directory.
Description of code:
In the given example, we... only the
files, we have created a condition
that if the array of
files contains
Java read multiple filesJava read multiple
files
In this section you will learn how to read the data of multiple
files. Here we have created four
files that includes information.... We have to find the students according to particular school from all the
files