Marketplace

Related Articles

More

Related Categories

Recently Added

More

Join StudyUp.com Today

It's always free and anyone can join!

Watch StudyUp Demo Video Now

You Recently Visited

Sample Format Of Report Writing

Karen Said:

Java Programming HELP how to write a program!?

We Answered:

/**
* CheckISBN v1.0
* by HavocInfinity
*/

import java.io.*;
import java.util.Scanner;
import java.util.StringTokenizer;

public class CheckISBN {

public static void main(String[] args) {
Scanner s = new Scanner(System.in);
System.out.println("Enter an International Standard Book Number (ISBN): ");
String ISBN = s.next();

ISBN = ISBN.replace('-', ' ');
ISBN = removeSpaces(ISBN);

System.out.println("The calculated check digit is: " + lastDigitISBN(ISBN));
if (lastDigitISBN(ISBN) == Character.getNumericValue((ISBN.charAt(9… {
System.out.println("The ISBN is correctly formatted.");
} else {
System.out.println("The ISBN is not correctly formatted.");
}
return;
}

static int lastDigitISBN(String str) {
int sum = 0;
for (int i = 1; i < 10; i++) {
int j = Character.getNumericValue((str.charAt(i - 1)));
sum += (j * i);
}
return (sum % 11);
}

static String removeSpaces(String s) {
StringTokenizer st = new StringTokenizer(s, " ", false);
String t = "";
while (st.hasMoreElements())
t+= st.nextElement();
return t;
}
}

Clifford Said:

Logic and design help....?

We Answered:

You did a lot of work posting that question. But, you are still going to get "the crap about not going to tell you how to do your homework." You see, you didn't tell us what kind of problem you have in understanding this.

You have to narrow it down for us. Otherwise, it looks like you expect us to either do your homework for you or explain every concept that might be useful in solving the problem.

If you don't understand it, you need to talk with your professor.

If it is a language barrier, try to find someone who can translate it to your native language. Or, at least ask about the words or expressions you don't understand.

Rick Said:

Fun SAS problem I need assistance with!?

We Answered:

assistance with, or 'do it for me'?

for 1f use the FIRSTOBS=5 OBS=6 with the rest of the program

i'm too lazy too write the rest...

Tim Said:

Java Program asking for statistics?

We Answered:

How is the file going to be formatted?

String input = JOptionPane.showInputDialog("Enter file name:");
BufferedReader br = new BufferedReader(new FileReader(input));

//this section will differ based on file format
double n = 0;
double sum = 0;
String line = br.readLine();
while(br != null){
//Parse the line of text to get the integers. (also depends on file
//format) If there are multiple integers on a line you'll probably
//want to use an inner loop.
n++;
sum += (the integer)
line = br.readLine();
}

System.out.println("The sum of " + n + " Integers is "+sum);
System.out.println("The Average is "+sum/n);
...

P.S. You should really do your own homework if you want to learn anything.

Discuss It!

Ram Mohan Roy said:

not at all related to the topic of report writing