Java

Need Help in Java Assignment?
We can help you if you are having difficulty with your Java Assignment. Just email your Java Assignment at admin@assignmentcache.com.
We provide help for students all over the world in Java Assignment.

Items 21 to 30 of 98 total

per page
Page:
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5

Grid  List 

Set Ascending Direction
  1. IT215 Week 6 Inventory Program Part 2

    IT215 Week 6 Inventory Program Part 2

    Regular Price: $12.00

    Special Price: $10.00

    IT215 Week Six: Object-Oriented Programming


    CheckPoint Inventory Program Part 2


    Modify the Inventory Program so the application can handle multiple items. Use an array to store the items. The output should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In addition, the output should display the value of the entire inventory.


    Create a method to calculate the value of the entire inventory.


    Create another method to sort the array items by the name of the product.

    Learn More
  2. IT215 Week 6 Inventory Program Part 3

    IT215 Week 6 Inventory Program Part 3

    Regular Price: $12.00

    Special Price: $10.00

    IT215 Week Six: Object-Oriented Programming


    CheckPoint Inventory Program Part 3


    Modify the Inventory Program by creating a subclass of the product class that uses one additional unique feature of the product you chose (for the DVDs subclass, you could use movie title, for example). In the subclass, create a method to calculate the value of the inventory of a product with the same name as the method previously created for the product class. The subclass method should also add a 5% restocking fee to the value of the inventory of that product.


    Modify the output to display this additional feature you have chosen and the restocking fee.

    Learn More
  3. IT215 Week 7 Inventory Program Part 4

    IT215 Week 7 Inventory Program Part 4

    Regular Price: $12.00

    Special Price: $10.00

    IT215 Week Seven: Graphics


    CheckPoint Inventory Program Part 4


    Modify the Inventory Program to use a GUI. The GUI should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In addition, the GUI should display the value of the entire inventory, the additional attribute, and the restocking fee.

    Learn More
  4. IT215 Week 8 Inventory Program Part 5

    IT215 Week 8 Inventory Program Part 5

    Regular Price: $15.00

    Special Price: $12.00

    IT215 Week Eight: Files and Streams


    CheckPoint Inventory Program Part 5


    Modify the Inventory Program by adding a button to the GUI that allows the user to move to the first item, the previous item, the next item, and the last item in the inventory. If the first item is displayed and the user clicks on the Previous button, the last item should display. If the last item is displayed and the user clicks on the Next button, the first item should display.


    Add a company logo to the GUI using Java graphics classes.

    Learn More
  5. IT215 Week 9 Inventory Program Part 6

    IT215 Week 9 Inventory Program Part 6

    Regular Price: $15.00

    Special Price: $12.00

    IT215 Week Nine: Java Programming Applications


    CheckPoint Inventory Program Part 6


    Modify the Inventory Program to include an add button, a delete button, and a modify button on the GUI. These buttons should allow the user to perform the corresponding actions on the item name, the number of units in stock, and the price of each unit. An item added to the inventory should have an item number one more than the previous last item.


    Add a save button to the GUI that saves the inventory to a C:\data\inventory.dat file.


    Use exception handling to create the directory and file if necessary.


    Add a search button to the GUI that allows the user to search for an item in the inventory by the product name. If the product is not found, the GUI should display an appropriate message. If the product is found, the GUI should display that product’s information in the GUI.


    Post as an attachment in Java format.

    Learn More
  6. Flower Pack Java Assignment 1

    CSC 275 Flower Pack Java Assignment 1

    Regular Price: $12.00

    Special Price: $10.00

    CSC 275 Flower Pack Java Assignment 1
    As I was on a hike the other day I came across a small child in the woods. He told me his life story, with special mention of his disabled sister that loves flowers, and asked me for a favor.
    He wanted a way to organize the flowers that he picks for her each day and perform a few basic tasks with them, along with a few restrictions. It is our goal to help him out!
    • He can only carry 25 flowers as adding any more causes many of them to become crushed.
    • He needs to be able to search for a specific type of flower in his pack incase his sister has a special request.
    • He needs to be able to sort flowers by their names alphabetically in ascending order (A-Z)
    • He needs to know how many of each flower he has in his pack.


    Now, I have started a simple program which will serve as guidance for you, please help me finish it. (Please don’t modify the code that I give you, just add your code where required)
    import java.util.Scanner;
    public class Assignment01Driver {
    public static void main(String[] args){
    new Assignment01Driver ();
    }
    // This will act as our program switchboard
    public Assignment01Driver (){
    Scanner input = new Scanner(System.in);
    String[] flowerPack = new String[25];
    System.out.println("Welcome to my flower pack interface.");
    System.out.println("Please select a number from the options below");
    System.out.println("");
    while(true){
    // Give the user a list of their options
    System.out.println("1: Add an item to the pack.");
    System.out.println("2: Remove an item from the pack.");
    System.out.println("3: Sort the contents of the pack.");
    System.out.println("4: Search for a flower.");
    System.out.println("5: Display the flowers in the pack.");
    System.out.println("0: Exit the flower pack interfact.");
    // Get the user input
    int userChoice = input.nextInt();
    switch(userChoice){
    case 1:
    addFlower(flowerPack);
    break;
    case 2:
    removeFlower(flowerPack);
    break;
    case 3:
    sortFlowers(flowerPack);
    break;
    case 4:
    searchFlowers(flowerPack);
    break;
    case 5:
    displayFlowers(flowerPack);
    break;
    case 0:
    System.out.println("Thank you for using the flower pack interface. See you again soon!");
    System.exit(0);
    }
    }
    }
    private void addFlower(String flowerPack[]) {
    // TODO: Add a flower that is specified by the user
    }
    private void removeFlower(String flowerPack[]) {
    // TODO: Remove a flower that is specified by the user
    }
    private void sortFlowers(String flowerPack[]) {
    // TODO: Sort the flowers in the pack (No need to display them here) - Use Selection or Insertion sorts
    // NOTE: Special care is needed when dealing with strings! research the compareTo() method with strings
    }
    private void searchFlowers(String flowerPack[]) {
    // TODO: Search for a user specified flower
    }
    private void displayFlowers(String flowerPack[]) {
    // TODO: Display only the unique flowers along with a count of any duplicates
    /*
    * For example it should say
    * Roses - 7
    * Daffodils - 3
    * Violets - 5
    */
    }
    }

    Learn More
  7. CMIS 242 Project 2 Age-Recognizing Form v2.0

    CMIS 242 Project 2 Age-Recognizing Form v2.0

    Regular Price: $15.00

    Special Price: $12.00

    CMIS 242 Project 2 Age-Recognizing Form v2.0

    Enhance the form you created in Homework 3 to add:
    1. a JCombobox to select the user's state of birth (assuming one of the 50 US states)
    2. a JRadio button to indicate the user's gender
    3. a JTextArea
    When the user clicks on the JButton (from Homework 3), your program should display all of the user's information in the JTextearea.
    You should use an appropriate layout manager to provide a neat, aesthetically-pleasing interface.
    Ensure that your code compiles and runs without errors. Additionally, be sure to comment your code appropriately.

    Learn More
  8. CMIS 242 Project 3 Recursion Exercises

    CMIS 242 Project 3 Recursion Exercises

    Regular Price: $15.00

    Special Price: $12.00

    CMIS 242 Project 3 Recursion Exercises


    Write a Java application that uses recursion to compute the results of the following series:
    1. ((((x * 2) * 2) * ...) * 2)
    for a series of n multiplications
    2. x + (x * 1) + (x * 2) + (x * 3) + ... + (x * n)
    3. 1 + 1/2 + 1/3 + ... + 1/n
    In the above, x and n are values provided by the user. (For #3, there is no x.)
    Ensure that your code compiles and runs without errors. Additionally, be sure to comment your code appropriately.

    Learn More
  9. Penn foster Graded Project Number Guessing Game JavA

    Penn foster Graded Project 1 Number Guessing Game Java

    Regular Price: $20.00

    Special Price: $15.00

    Penn foster Graded Project Number Guessing Game Java

    For your first project, you'll create a simple number guessing game. The game will use a for statement to ask for three guesses and an if statement to determine if the answer is right.

    1. In NetBeans, create a new Java Application project named NumberGuess. Review Activity 2 for details.

    2. In the main() method, add the following code to generate a random number. Note that the fourth and fifth lines of code should all go on one single line.
    int randNum, guessNum, attemptNum;
    //Generates a random number from 1 to 10
    randNum = new java.util.Random().nextInt(10) + 1;
    System.out.println("I am thinking of a number from 1 to 10");

    3. Using a for loop, ask for three guesses, using the attemptNum variable. See pages 23–24 in the textbook for more details. You can use the following code to ask for a guess:
    System.out.print("Guess? ");
    //Wraps the default input in a simple parser
    called Scanner
    java.util.Scanner scan = new
    java.util.Scanner(System.in);
    guessNum = scan.nextInt(); //Reads the next command-line int
    System.out.println("You guessed " + guessNum);

    4. Using an if statement in the for block, determine whether randNum and guessNum are equal. See pages 21–23 for in the textbook for more details. You can use the following code if randNum and guessNum are equal:
    System.out.println("You guessed it!");
    break;

    5. When you're finished, the contents of the main() method should resemble the following:
    int randNum, guessNum, attemptNum
    //Generates a random number from 1 to 10
    randNum = new java.util.Random().nextInt(10) + 1;
    System.out.println("I am thinking of random number from 1 to 10");
    for (/* Figure this part out yourself */) {
    System.out.print("Guess? ");
    java.util.Scanner scan = new
    java.util.Scanner(System.in);
    guessNum = scan.nextInt();
    System.out.println("You guessed " + guessNum);
    if (/* Figure this part out yourself */) {
    System.out.println("You guessed it!");
    break;
    }
    }

    6. Compile and run the project to ensure it works as expected. To type input, make sure you click in the Output panel; otherwise, you’ll modify code.

    Learn More
  10. Penn foster Graded Project 3 Cell-based Board Games Java

    Penn foster Graded Project 3 Cell-based Board Games Java

    Regular Price: $20.00

    Special Price: $15.00

    Penn foster Graded Project 3 Cell-based Board Games Java

    In this project, you'll create data types in a class structure for cell-based board games similar to Tic-Tac-Toe. Games like Connect Four and Mastermind also use boards divided by rows and columns. The Board and Cell classes represent the board, while the Player, Mark, and Outcome enumerations track the game.
    You’ll use the classes and enumerations created in this project in future graded projects. You use the NetBeans project in the next lesson

    INSTRUCTIONS
    1. In NetBeans, create a new Java Application project named BoardGameTester.
    2. Create a new package named games and a sub-package of games named board. The easiest way is simply to create a package named games.board.
    3. Add an enumeration named Player to the games.board package. You could add Empty Java File or choose Java Enum as the file type. This enumeration represents the current player in a turn-based game. Use the following code:
    public enum Player {FIRST,SECOND}
    Note: Although Tic-Tac-Toe and Mastermind allow only two players, Connect Four can be played with up to four players. For simplicity, our code will handle only two players.
    4. Add an enumeration named Outcome to the games.board package. This enumeration represents the result when the turn is completed. Use the following code:
    public enum Outcome {PLAYER1_WIN, PLAYER2_WIN, CONTINUE, TIE}
    5. Add an enumeration named Mark to the games.board package. This enumeration represents the result when the game is completed. Use the following code:
    public enum Mark {EMPTY, NOUGHT, CROSS, YELLOW, RED, BLUE, GREEN, MAGENTA, ORANGE}
    Keep in mind that only yellow and red are used in Connect Four, while Mastermind uses all six colors.
    6. Add the Cell class to the games.board package. It should have the private variables content, row, and column, and the public methods getContent, setContent, getRow, and getColumn. Use the following code as a guide:
    public class Cell {
    private Mark content;
    private int row, column;
    public Cell(int row, int column) {
    this.row = row;
    this.column = column;
    content = Mark.EMPTY;
    }
    public Mark getContent() { return content; }
    public void setContent(Mark content) { this.content = content;
    }
    public int getRow() { return row; }
    public int getColumn() { return column; }
    }
    Take note that all classes that support direct instantiation should have a constructor. In this case, the constructor will be used by the Board class to create each of its cells.
    7. Add the Board class to the games.board package. It should have a two-dimensional array of Cell objects. The Board class should initialize a board with a specified number of columns and rows, provide access to Cell objects, and display all of its cells correctly. Use the following code as a guide:
    public class Board {
    private Cell[][] cells;
    public Board(int rows, int columns) {
    cells = new Cell[rows][columns];
    for( int r = 0; r < cells[0].length; r++) {
    for (int c = 0; c < cells[1].length;c++) {
    cells[r][c] = new Cell(r,c);
    }
    }
    }
    public void setCell(Mark mark, int row, int
    column) throws IllegalArgumentException {
    if (cells[row][column].getContent() == Mark.EMPTY)
    cells[row][column].setContent(mark);
    else throw new IllegalArgumentException("Player already there!");
    }
    public Cell getCell(int row, int column) {
    return cells[row][column];
    }
    public String toString() {
    StringBuilder str = new StringBuilder();
    for( int r = 0; r < cells.length; r++ ) {
    str.append("|");
    for (int c = 0; c < cells[r].length; c++) {
    switch(cells[r][c].getContent())
    {
    case NOUGHT:
    str.append("O");
    break;
    case CROSS:
    str.append("X");
    break;
    case YELLOW:
    str.append("Y");
    break;
    case RED:
    str.append("R");
    break;
    case BLUE:
    str.append("B");
    break;
    case GREEN:
    str.append("G");
    break;
    case MAGENTA:
    str.append("M");
    break;
    case ORANGE:
    str.append("M");
    break;
    default: //Empty
    str.append(" ");
    }
    str.append("|");
    }
    str.append("\n");
    }
    return str.toString();
    }
    }

    This code should seem familiar to you. The methods in the TicTacToeGame class are similar to those in the Board class. The StringBuilder class was used instead of the String class for better performance. You can learn more about the StringBuilder class by visiting the Oracle Website at http://docs.oracle.com/javase/tutorial/java/data/buffers.html.

    8. Add the following import statement to the BoardGameTester class:
    import games.boards.*;

    9. In the main() method of BoardGameTester, perform the following actions:
    a. Create a 3 × 3 board for a Tic-Tac-Toe game.
    b. Create a 6 × 7 board for a Connect Four game.
    c. Create a 5 × 8 board for a game of Mastermind.
    d. Set a cell to a nought or cross on the Tic-Tac-Toe board.
    e. Set a cell to yellow or red on the Connect Four board.
    f. Set a cell to yellow, red, green, blue, magenta, or orange on the Mastermind board.
    g. Display the boards for Tic-Tac-Toe, Connect Four, and Mastermind.

    10. Compile and run the project to ensure it works as you expected it to.

    Learn More

Items 21 to 30 of 98 total

per page
Page:
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5

Grid  List 

Set Ascending Direction