Write a (very short) program that creates a serial text file holding just two or three names of your own choosing.

1.Write a (very short) program that creates a serial text file holding just two or three names of your own choosing. After compiling and running the program, use the MS-DOS command type (or the equivalent command for your platform) to display the file's contents. For example:


type names.txt

2. Using a text editor or word processor, create a text file containing a series of

five surnames and examination marks, each item on a separate line. For






By extending the code given below, create a random access file called

results.dat, accepting input from the standard input stream (via a Scanner

object) and redirecting input from the above text file. Each record should

comprise a student surname and examination mark. When all records have been  written, reposition the file pointer to the start of the file and then read each record in turn, displaying its contents on the screen.

import java.io.*;

import java.util.*;

public class FileResults


private static final long REC_SIZE = 34;

private static final int SURNAME_SIZE = 15;

private static String surname;

private static int mark;

public static void main(String[] args)

throws IOException



*** SUPPLY CODE FOR main! ***



public static void writeString(

RandomAccessFile file, String text,

int fixedSize) throws IOException


int size = text.length();

if (size<>



for (int i=size; i

file.writeChar(' ');






public static String readString(

RandomAccessFile file, int fixedSize)

throws IOException


String value = “”;

for (int i=0; i


return value;




find the cost of your paper

At what point must the rights of the individual be protected against the power of the state, and when must they bow to the enduring value of respected tradition?

In the Sudan, an eight-year-old girl is given by her family to a priest in a neighboring village. She is told to serve him and obey all his wishes. Someone….

based on economic system and lifestyle, but where do we stop? And, if there is no place to stop, what remains?

African philosopher Kwasi Wiredu claims that throwing the colonizing power out of your country is much easier than throwing the colonizer out of your mind. The real damage to indigenous….

Can you imagine one craftsperson capable of making all these things?

Let’s consider why dramatic poetry must be banished from our republic. We must begin with the notion of imitation or representation. A carpenter who wishes to make a bed or….