Need help writing a Java Program. CSCI experts chime in.

Just google it . U will find similar code and just tweak it till it works for u . In b4 lock
 
Just google it . U will find similar code and just tweak it till it works for u . In b4 lock
thanks working on it right now.

so far I got this.

public static void main(String[] args)
{
String make;
make = JOptionPane.showInputDialog("What is the make and model of your vehicle?");
return;

}
public static void greeting(String Hello)
{
JOptionPane.showMessageDialog("Hello! We will be happy to service your" + make + "today!");

}

public static double carMaintenance;
{
double totalPrice;
String oil;
oil = JOptionPane.showInputDialog("Do you want an oil change?");

and hopefully a csci wiz comes in before thread locks :lol 8o
 
Graduated with a computer science degree in 2013. My primary language was Java. I could have it done in less than an hour.

Are you going to make it worth my time?
 
You should try www.stackoverflow.com or other websites dedicated more towards programming.  I graduated wi/ a computer Science degree this past spring & it never crossed my mind to post on NT for stuff like this.  Just saying.
 
You should try www.stackoverflow.com or other websites dedicated more towards programming.  I graduated wi/ a computer Science degree this past spring & it never crossed my mind to post on NT for stuff like this.  Just saying.

Stack overflow can be a very unforgiving community :lol

Got me through some rough patches though. Great for piggybacking on other examples.
 
Graduated with a computer science degree in 2013. My primary language was Java. I could have it done in less than an hour.

Are you going to make it worth my time?
possibly :lol and these are basic codes so I know it shouldn't take long but I honestly can't keep up with summer semester courses being an online course as well. So basically all info is self taught, and thats something I struggle with. I need to be in class learning rather than trying to watch tutorial videos or listening to audio lectures. :{
 
The first step is to admit you have a problem :lol

Let me boot up my laptop I got you.
 
The first step is to admit you have a problem :lol

Let me boot up my laptop I got you.
:Nthat I'm doing well in my web development class though :lol the parts that stumps me in Java are the algorithms.
 
Last edited:
package helping******;

import java.util.Scanner;

class JOptionPane



    public static void main(String[] args)

    {

        Scanner user_input = new Scanner( System.in );

        String make;

        System.out.print("What type of automobile do you own?" + "\n" );

        //asking user make of car

        make = user_input.next( );

        //storing input in string 

        //System.out.println(make); <--test OK

        greeting(make);

    }

    public static void greeting(String make)

    {

        System.out.println("Hello! We will be happy to service your " + make + " today!");

    }

    /*

    public static double carMaintenance;

    {

    double totalPrice;

    String oil;

    oil = JOptionPane.showInputDialog("Do you want an oil change?");

    }

    */

}

#soon 

:)
 
Thought I was going to have something fun to do.

Damn.
 
I hope you looked out for @Yeah since he did your code for you. A place like stackoverflow would have
flamed you to death, and never answered your question and did your work.
 
:lol when i made the thread it was around 12:30 pm in atl and I just got off of work around 10:30. I k.o.d shortly after.
 
OP if software development is going to be your career then you would have been better off learning how to do it yourself. This is a second or third assignment type program.
 
OP if software development is going to be your career then you would have been better off learning how to do it yourself. This is a second or third assignment type program.
I'm not planning to be. This was a required class thats part of the computer science major. I am an IT major and prefer working more with html.
 
Man, I wanna learn Java to build Android apps but that ish is low key confusing. Maybe in the future, |I
 
OP if software development is going to be your career then you would have been better off learning how to do it yourself. This is a second or third assignment type program.

Stop with that man. :lol I really struggled when I first started coding using Javascript ( :x ). I definitely needed help for algorithms of this difficulty and even easier.

Everyone who programs has had to ask for help somewhere along the line. Sometimes you just need to see the finished product first before it clicks.


Man, I wanna learn Java to build Android apps but that ish is low key confusing. Maybe in the future, |I

Tomorrow you will wish you would have started today. There are a looooot of resources these days to help you start coding. The first few months will be brutal and you'll feel like a dummy, but slowly and surely you'll start learning stuff.

Download Eclipse. Download Android Studio & SDK. Create an account on XDA. Message me any time for help.

Here's the code btw. Kept it very simple and even left in some rookie mistakes (pros close their scanner instances) ;)

Code:
package helping******;
import java.util.Scanner;

class JOptionPane
{ 
	public static void main(String[] args)
	{
		Scanner user_input = new Scanner( System.in );
		String make;
		System.out.print("What type of automobile do you own?" + "\n" );
		//asking user make of car
		make = user_input.next( );
		//storing input in string 
		//System.out.println(make);  0)
			{
				totalPrice = totalPrice + (totalPrice*.05);
				System.out.println("An import tax of 5% will be added to your total."); 
			}
		
		System.out.println("Your total price will be $" + totalPrice + ". Thank you, and have a wonderful day!");
	}
}

And for the record no monetary exchange occured. Told OP to pay it forward. :lol
 
Last edited:
Back
Top Bottom