I am to create a program that works as follows:
1. Write a java class (Employee.java) that encapsulates an employees first name, last name, SSN. Implement the apporpriate get and set methods along...
Type: Posts; User: Spanky_10
I am to create a program that works as follows:
1. Write a java class (Employee.java) that encapsulates an employees first name, last name, SSN. Implement the apporpriate get and set methods along...
I know how to use classes and objects but I am not good with the arrays. I am not sure how to assign the suit for the first dimension because I also had to create a single dimensional array for the...
My two-dimensional array is:
String[][] cards
The first dimension is to represent the suit and the second dimension will represent the type of card(from ace to King)
I want the constructor to...
Pass is what I believe is being added to the ArrayList, which is defined in the default constructor. So it is not in the same scope but I do not know how to bring them out of that ArrayList to read...
I am trying to take a text file and read it into the ArrayList I created. It should store the passengers name and the passenger's service class.
The text file has the following format:
James ...
For the following problem, I have created the passenger class and have created the ArrayList in the Train Class. I do not know how to read the passengers from a text file into the ArrayList. And I...
This is what I compiled
public double[][] get_less_tax()
{
double leastTax = rates[0][0];
double[][] array1 = new double[rates.length][];
for(int x = 0; x <...
I want to use a for loop to check if the number stored in each part of the array is less than .001
for(int x = 0; x < rates.length; x++)
{
for (int i = 0; i <...
I have a program that creates a double array for 50 states storing the last 10 tax rates for each year. The tax rate is less than .06 in all of them and is randomly configured to make the program run...
I added the print out statement after the while statement and it did print what I input into choice onto the display. It just won't run the program again.
My code all works fine and I have a user defined class called Circle. When I type "y" or "Y" it will not re run the program.
import java.util.Scanner;
public class CircleTest
{
public...
Thank you! I finally got it! You can tell I'm definitely new to this
I added an array to my code and thought I did it correct but I get an error saying " cannot find symbol -- myIntArray"
import java.util.Scanner;
public class EnglishCalculator
{
...
I have the whole code better written now and the only thing I cannot figure out is how to change the num1 and num2 to strings that actually print out the digits in words.
Output should be "nine"...
import java.util.*;
public class StudentInformation
{
public static void main (String [] args)
{
Scanner scan = new Scanner (System.in);
...
import java.util.*;
public class StudentInformation
{
public static void main (String [] args)
{
Scanner scan = new Scanner (System.in);
...
I am trying to figure out how to convert digits from 0 to 9 to words in my program.
What is the proper code to do this?
I have found examples online but none of them are working with my code. ...
so completely take out the string = x; and delete the switch (x) but replace it with just int?
public class StudentInformation
{
public static void main (String [] args)
{
String x;
for (int n = 12; n >= 1; n--)
{
System.out.println ("On the "...
So the switch statement without a break will print 3 when i call it and then it will also print 2 and 1 after it or do I need to print them backwards so 12 is the first case and 1 is the last case...
i did look at that but I don't understand how I can print the first line, then the second line but changing it to "2nd day" and reprinting the first line.
This is the problem I have to do for a lab. I am not asking anyone to do the work for me but if they could just start it because I have no idea and my textbook doesn't help me very much with this...
import java.io.File;
import java.io.IOException;
import java.util.Scanner;
import java.text.DecimalFormat;
public class EchoFileData
{
public static void main(String [] args) throws...
Thank You so much! I finally figured it out!
I'm not sure how to do that. It is a download file that I downloaded for an assignment. That is where the text file is located. I tried moving it to my computer, but I'm not exactly sure where to...