Java files

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 Beginners
java 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 Beginners
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.... The input files are structured as follows: ˆ one student record per line ?
Advertisements
java and files - Java Beginners
java 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 Beginners
Copy 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 Beginners
files  Why do we require files to store data?  Hi friend, files to store data, easy to find and access them. Thanks
configuration files - Java Beginners
configuration 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 Beginners
listing 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
files
files  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 Beginners
using 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 files
Java 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 jsp
regarding 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 Beginners
Reading 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 Beginners
Reading 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 Java
how 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 Beginners
list 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 Beginners
java-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 Files
Java 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
How do I decompile Java class files?
How do I decompile Java class files?  How do I decompile Java class files
How to avoid Java Code in JSP-Files?
How to avoid Java Code in JSP-Files?  How to avoid Java Code in JSP-Files
Running Batch files in java - Java Beginners
Running 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: Searching a string from doc files
Java: Searching a string from doc files   I want to search a string from DOC, DOCX files in java. Can anyone please help me
Java programming help with files - Java Beginners
Java 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 Beginners
Append 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 files
Java 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 format
How 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
Write the Keys and Values of the Properties files in Java
Write the Keys and Values of the Properties files in Java... will learn how to add the keys and it's values of the properties files in Java. You know the properties files have the the keys and values of the properties files
Read the Key-Value of Properties Files in Java
Read the Key-Value of Properties Files in Java       In this section, you will learn how to read the key-value of properties files in Java. This section provides you
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 directory
Java 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 files
Java 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 files
Java 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
Files - Java Beginners
how to browse the general files which are in system using java? - Java Beginners
how to browse the general files which are in system using java?  how to browse the general files which are in system using java? its just like in ms... and it shows all the word document files, like that i want open all image files using
Files
files
files
files
files
files
Java File - Learn how to handle files in Java with Examples and Tutorials
. Read file in Java Reading files in Java How to read file...Java File - Example and Tutorials This section is discussing about file handling in Java. You will learn how to handle file in Java. Examples given here
How to enable commenting into pdf files using java? - Java Beginners
How to enable commenting into pdf files using java?  I need to enable commenting feature in a pdf through Java program. Normally when we open a pdf..., commenting tool bar wonˇ¦t appear. I need to do this same setting through Java
Download dynamic link files to local directory - java code
Download dynamic link files to local directory - java code  Hi, I found a code that downloads static links but not dynamic link files.can anyone give a solution for downloading dynamic link files? Thanks in advance
how to copy files from remote location to local using java?
how to copy files from remote location to local using java?  I want to copy all files from shared folder to local. Please help
java program to read multiple files from a directory and display them on a jframe
java program to read multiple files from a directory and display them on a jframe  hi guys i want to write a java program that will read all files in a directory and display them one by on on a jframe on jpanel with specific key
How Compare 2 xml files with JDOM - Java Beginners
How Compare 2 xml files with JDOM  Hi I'm want help on how can I compare 2 xml files using JDOM in java and identify whether have the same content or not My files can simply be File1 File2
Get All Keys and Values of the Properties files in Java
Get All Keys and Values of the Properties files in Java... to get all keys and it's values of the properties files in Java. Java provides.... The properties files that can be used to large collections of information

Ads