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 31 to 40 of 177 total

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

Grid  List 

Set Descending Direction
  1. Penn Foster Exam 40259500 Tic-Tac-Toe game Java Program

    Penn Foster Exam 40259500 Tic-Tac-Toe game Java Program

    Regular Price: $12.00

    Special Price: $10.00

    Penn Foster Exam 40259500 Tic-Tac-Toe game Java Program


    In this project, you’ll create a text-based Tic-Tac-Toe game in which each player places either an X or O mark on a ninegrid square. An X mark is known as a cross, while an O is called a nought. The winner is the first player to place their mark on three contiguous squares vertically, horizontally or diagonally across. You can read about it in more detail on Wikipedia (http://en.wikipedia.org/wiki/Tic-tac-toe).
    The output of this project will be referenced in the subsequent graded projects for this course


    1. In NetBeans, create a new Java Application project named TicTacToeGame.


    2. Add the following variable and constant declarations to the TicTacToeGame class:
    static int[][] gameboard;
    static final int EMPTY = 0;
    static final int NOUGHT = -1;
    static final int CROSS = 1;
    Note: The variable gameboard is a two-dimensional int array.
    Think of it as a table with rows and columns, where a cell can be empty (0) or contain a nought (–1) or cross (1) . The constants EMPTY, NOUGHT, and CROSS will simplify your code.


    3. Add the following utility methods to the TicTacToeGame class:
    static void set(int val, int row, int col) throws IllegalArgumentException {
    if (gameboard[row][col] == EMPTY) gameboard[row][col] = val;
    else throw new IllegalArgumentException(“Player already there!”);
    }
    static void displayBoard() {
    for( int r = 0; r < gameboard.length; r++ ) {
    System.out.print(“|”);
    for (int c = 0; c < gameboard[r].length; c++) {
    switch(gameboard[r][c]) {
    case NOUGHT:
    System.out.print(“O”);
    break;
    case CROSS:
    System.out.print(“X”);
    break;
    default: //Empty
    System.out.print(“ “);
    }
    System.out.print(“|”);
    }
    System.out.println(“\n———-\n”);
    }
    }


    4. Add the following method signatures to the TicTacToeGame class:


    5. Define the createBoard method.


    6. Define the winOrTie method. Check first for a win with rows and columns and then diagonally. Finally, check to see if there are any empty cells without a cross or naught.
    static void createBoard(int rows, int cols) {
    //Initialize the gameboard
    }
    static boolean winOrTie() {
    //Determine whether X or 0 won or there is a tie
    }
    Note: Review the sections “Initializing Multidimensional Arrays” on pages 144–145 and “Iterating Over Multidimensional Arrays” on pages 156–158 for how to initialize and iterate through a multidimensional array. A player wins if all the cells in a row or column are the same mark or diagonally through the center. The players tie if all cells have a cross or nought, but no player has three marks horizontally, vertically, or diagonally. Return NOUGHT if nought wins, CROSS
    if cross wins, 0 if there’s a tie, and another value (like –2, for example) if there are empty cells on the board.


    7. In the main() method, perform the following actions:
    a. Create the board and initialize a turn counter, player value, and game outcome. For nought, the value is –1, while 1 is the value for cross.
    b. While there’s no winner or tie, display the board and prompt for a row and column for the current player.
    static void createBoard(int rows, int cols) {
    //Initialize the gameboard
    }
    static boolean winOrTie() {
    //Determine whether X or 0 won
    c. Use a try/catch block to handle the exception from the set method. You can use the System.err.println method rather than the System.out.println method
    to output the exception. This will display the message in red.
    d. Display the final board and a message on which player won or if there’s a tie.


    8. When completed, the contents of the main() method should resemble the following:
    createBoard(3,3);
    int turn = 0;
    int playerVal;
    int outcome;
    java.util.Scanner scan = new java.util.Scanner(System.in);
    do {
    displayBoard();
    playerVal = (turn % 2 == 0)? NOUGHT : CROSS;
    if (playerVal == NOUGHT) System.out.println(“\n—O’s turn—”);
    else System.out.println(“\n—X’s turn—”);
    System.out.print(“Enter row and column:”);
    try {
    set(playerVal, scan.nextInt(), scan.nextInt());
    } catch (Exception ex) {System.err.println(ex);}
    turn ++;
    outcome = winOrTie();
    } while ( outcome == -2 );
    displayBoard();
    switch (outcome) {
    case NOUGHT:
    System.out.println(“O wins!”);
    break;
    case CROSS:
    System.out.println(“X wins!”);
    break;
    case 0:
    System.out.println(“Tie.”);
    break;
    }


    9. Compile and run the project to ensure it works as expected. Try a few games to verify all wins and ties are correctly detected.
    The application should behave as follows in the Output window:
    | | | |
    | | | |
    | | | |


    —O’s turn—
    Enter row and column:0 0
    |O| | |
    | | | |
    | | | |


    —X’s turn—
    Enter row and column:0 1
    |O|X| |
    | | | |
    | | | |


    —O’s turn—
    Enter row and column:1 1
    |O|X| |
    | |O| |
    | | | |


    —X’s turn—
    Enter row and column:2 0
    |O|X| |
    | |O| |
    |X| | |


    —O’s turn—
    Enter row and column: 2 2.
    |O|X| |
    | |O| |
    |X| |O|
    O wins!


    SUBMISSION GUIDELINES
    To submit your project, you must provide the following two files:
    TicTacToeGame.java
    TicTacToeGame.class
    To find these files within NetBeans, go to the TicTacToeGame project folder. To determine this folder, right-click on TicTacToeGame project in the Projects panel. Copy the value for the Project Folder textbox using the keyboard shortcut CTRL+C. In Windows Explorer, paste the project folder path and hit the ENTER key. Copy both the TicTacToeGame.java file from the src\tictactoegame folder and the TicTacToeGame.class file from the build\tictactoegame folder to your desktop or any other temporary location.

    Learn More
  2. ITS 320 Program 3 Exercise 5.17 Java

    ITS 320 Assignment 3 Decision Control and Loops with User Interaction

    Regular Price: $15.00

    Special Price: $12.00

    ITS 320 Assignment 3 Decision Control and Loops with User Interaction


    1) Write a Java application that prompts the user for pairs of inputs of a product number (1-5), and then an integer quantity of units sold (this is two separate prompts for input values). You must use a switch statement and a sentinel – controlled loop (i.e. a loop that stops execution when an out of range value, such as -1, is input). All 15 items below are for a single purchase. There are five sets of inputs as follows:
    Product 1 1 unit (cost is $2.98 per unit)
    Product 2 2 units (cost is $4.50 per unit)
    Product 3 3 units (cost is $9.98 per unit
    Product 4 4 units (cost is $4.49 per unit)
    Product 5 5 units (cost is $6.87 per unit)
    Your application must calculate and display the total retail value of all products sold, after all 5 pairs of inputs are completed. You must also display the total after each new pair of input values is entered. (This program was taken from Exercise 5.17 on page 228 of Deitel & Deitel's "Java How to Program (Sixth Edition)" (2005 by Pearson Publishing Co.))


    2) You may use the Windows Command Prompt command line interface or any Java IDE you choose to compile and execute your program.


    3) You are to submit the following deliverables to the Assignment Dropbox in a single Microsoft Word file:
    A screen snapshot of your Java source code (just the beginning is OK) as it appears in your IDE (e.g. jGRASP, Net Beans, Eclipse, etc.) or editor (e.g. a Windows Command Prompt DOS "more" of the .java file's first screen).
    A listing of your entire Java source code in the same Microsoft Word file as item a), and following item a). You can simply copy and paste the text from your IDE into Word. Be sure to maintain proper code alignment by using Courier font for this item.
    A screen snapshot of your program’s input and output in the same Microsoft Word file, and following item b). You must include screen snapshots of all inputs and all outputs,not just a sample.


    4) Your instructor may compile and run your program to verify that it compiles and executes properly.


    5) You will be evaluated on (in order of importance):
    Inclusion of all deliverables in Step #3.
    Correct execution of your program.
    Adequate commenting of your code.
    Good programming style (as specified in the textbook's examples).
    Neatness in packaging and labeling of your deliverables

    Learn More
  3. ITS 320 Assignment 4 Line Separator Java Program

    ITS 320 Assignment 4 Separate lines Java Program

    Regular Price: $15.00

    Special Price: $12.00

    ITS 320 Assignment 4 Separate lines Java Program


    1. Write a program to assign the integer values 1 through 25 to a 25 element integer array. Then, print the array as five separate lines each containing five elements separated by commas. The last element on each line should be followed by a newline instead of a comma. The output of your program should appear exactly as follows:
    1,2,3,4,5
    6,7,8,9,10
    11,12,13,14,15
    16,17,18,19,20
    21,22,23,24,25


    Hints:
    One way to determine every 5th element is to use the modules operator (%). If you divide the subscript by 5 and the remainder is 0, it is the 5th number.
    You can use System.out.print() to print a value without a newline following it. This will allow you to print multiple things on the same line.
    You may use the Windows Command Prompt command line interface or any Java IDE you choose to compile and execute your program.

    Learn More
  4. ITS 320 Assignment 5 Phone subclass Java Program

    ITS 320 Assignment 5 Inheritance and Polymorphism Java Program

    Regular Price: $15.00

    Special Price: $12.00

    ITS 320 Assignment 5 Inheritance and Polymorphism Java Program


    Key in the PolyMain, Book, Almanac, and Novel classes defined in this module of the course. Once you get each of these classes keyed in, make sure they compile and execute properly. Then create a third subclass called Phone that also extends the Book class. The Phone class should keep track of the number of yellow pages and the number of white pages in each phone book. Make sure the Phone subclass you create has a print method having the same signature as the print method in the Book class. The print method from the Phone class should print the title of the book, followed by the number of yellow pages and white pages contained within the phone book. Thus, the print method should have the following signature:
    public void print();


    The Phone class should also have a constructor having the following signature:


    public Phone(String title, int whitePages, int yellowPages);


    This constructor should sum up whitePages + yellowPages to get the total number of pages in the book. Remember the total pages in the book and the title of the book are set in the constructor for the Book class.


    Modify the PolyMain class to create at least one of your phone books and store it in the library. You should now be able to print the library without having to modify the print method defined within the PolyMain class.

    Learn More
  5. ITS320 Assignment 6 BadDataException Java Program

    ITS320 Assignment 6 BadDataException Java Program

    Regular Price: $15.00

    Special Price: $12.00

    ITS320 Assignment 6 BadDataException Java Program


    Create three exception classes named NumberHighException, NumberLowException, and NumberNegativeException. Both NumberHighException and NumberLowException should be directly subclassed from the Exception class, but NumberNegativeException should be subclassed from NumberLowException. You can use the BadDataException class that was defined in this module as the model for your exception classes.


    Next create a class called Verify that will be used to validate that a number is within a specified range. It should have one constructor that has 2 int parameters. The 1st parameter is the minimum number in the range, and the 2nd parameter is the maximum number in the range.


    In addition to the constructor, the Verify class should have one method that is named validate. The validate method will have a single parameter of data type int. The parameter contains the number that is being validated. If the value of the parameter is less than zero, the method should throw a NumberNegativeException. If the value is less than the minimum value of the range, it should throw a NumberLowException. If the value is greater than the maximum value of the range, it should throw a NumberHighException. If the value is within the specified range, no exception should be thrown.


    Once all of these classes are created, create the driver class called Program5. The driver class should instantiate a Verify object with a range of 10 to 100. It should then do the following:
    Prompt the user to input a number within the specified range.
    Use a Scanner to read the user input as an int. You can ensure that an int was entered because the nextInt method in the validate class throws an InputMismatchException if any non digits are entered.
    Call the validate method to validate that the number is within the range.
    Print an appropriate error message if the value is not within the range, or print the value if it is within the range.


    BadDataException class


    public class BadDataException extends Exception
    {
    // creates exception object with no message
    // null message in superclass
    public BadDataException()
    { }


    // str used for exception message
    // explicitly invokes superclass constructor
    public BadDataException(String str)
    {
    super(str);
    }


    public String toString()
    {
    return "BadDataException";
    }
    }

    Learn More
  6. CMIS 242 Project 2 State Income Tax Java Program

    CMIS 242 Project 2 State Income Tax Java Program

    Regular Price: $15.00

    Special Price: $12.00

    CMIS 242 Project 2 State Income Tax Java Program


    The second programming project involves writing a program to calculate state income tax for a single taxpayer that uses a GUI. The GUI should use the grid layout manager and should looks similar to the following:


    The salary income, interest income, itemized deductions, exemptions and tax withheld are input to the program. When the Compute Refund button is clicked, the refund should be computed and displayed. Assume all inputs are in whole dollars.


    The refund should be computed as follows. First compute the total gross income as the sum of the salary and interest income. Then compute the taxable income, which is the gross income less the itemized deductions and exemptions. The exemption amount is computed as the number of exemptions multiplied by $2700. Next compute the tax owed for the year according to the following tax table:


    Taxable Income Tax Owed
    From To
    $0 $50,000 5% of taxable income
    $50,000 $100,000 $2,500 + 7% of amount above $50,000
    $100,000 -- $6,000 + 9% of amount above $100,000


    Finally, compute the amount of the refund as the amount withheld minus the tax owed. Note that this amount will be negative if additional taxes are owed. Display this amount in the bottom text field rounded to the whole dollar.


    If the data entered in any of the text fields is not numeric or not an integer value, the exception that will be thrown when attempting to convert to an integer should be caught, and an appropriate error message should be displayed using a JOptionPane popup window.

    Learn More
  7. ITS 320 Java Program 1 Compiled

    ITS 320 Java Program 1 Verify Java and IDE Setup

    Regular Price: $12.00

    Special Price: $10.00

    ITS 320 Java Program 1 Verify Java and IDE Setup


    This simple exercise is meant to verify that you’ve properly installed Java SE and an IDE on your computer so that you are ready for the later programming assignments in this class.


    Type in the following program source code from Joyce Farrell’s 4th Edition Java textbook to your IDE. Then modify the comments for your name and the current date, and change the class file name to reflect your first name. Then compile your code.


    /**
    Program #1
    Function: Simple Java application to demonstrate the behavior of
    different data types, arithmetic, concatenation, and
    output of results.
    Programmed By: Reggie Haseltine, instructor (July 18, 2009)
    Code Taken From: "Java Programming (Fourth Edition" by Joyce Farrell,
    Figure 2-26, page 61
    */


    public class P1_Reggie {
    public static void main(String[] args) {
    int oneInt = 315;
    short oneShort = 23;
    long oneLong = 1234567876543L;
    int value1 = 43, value2 = 10, sum, difference, product, quotient, modulus;
    boolean isProgrammingFun = true;
    double doubNum1 = 2.3, doubNum2 = 14.8, doubResult
    char myGrade = 'A', myFriendsGrade = 'C';
    System.out.println("Our grades are " + myGrade + " and "
    + myFriendsGrade);
    doubResult = doubNum1 + doubNum2;
    System.out.println("The sum of the doubles is " + doubResult);
    doubResult = doubNum1 * doubNum2;
    System.out.println("The product of the doubles is " + doubResult);
    System.out.println("The value of isProgrammingFun is "
    + isProgrammingFun);
    System.out.println("The value of isProgrammingHard is "
    + isProgrammingFun);
    System.out.println("The int is " + oneInt);
    System.out.println("The short is " + oneShort);
    System.out.println("The long is " + oneLong);
    sum = value1 + value2;
    difference = value1 - value2;
    product = value1 * value2;
    quotient = value1 / value2;
    modulus = value1 % value2;
    System.out.println("Sum is " + sum);
    System.out.println("Difference is " + difference);
    System.out.println("Product is " + product);
    System.out.println("Quotient is " + quotient);
    System.out.println("Modulus is " + modulus);
    System.out.println("\nThis is on one line\nThis on another");
    System.out.println("This shows\thow\ttabs\twork");
    }
    // end method main
    }


    Then execute the .class file and verify that you get the following output.

    Learn More
  8. ITS 320 Java Program 2 BankAccount Class Output

    ITS 320 Java Program 2 Custom BankAccount Class with a Modified Constructor

    Regular Price: $15.00

    Special Price: $12.00

    ITS 320 Java Program 2 Custom BankAccount Class with a Modified Constructor


    1) Enter the code for the two classes "BankAccount.java" and "Program2.java" shown below. The Program2 class is a driver for the BankAccount class. Note that this version of the BankAccount class accepts a monthly interest rate in decimal format which must be calculated by the user.
    /**
    * BankAccount class
    * This class simulates a bank account.
    *
    * (Taken from "Starting Out with Java - Early Objects
    * (Third Edition) by Tony Gaddis, 2008 by Pearson Educ.)
    *
    */
    public class BankAccount
    {
    private double balance; // Account balance
    private double interestRate; // Interest rate
    private double interest; // Interest earned


    /**
    * The constructor initializes the balance
    * and interestRate fields with the values
    * passed to startBalance and intRate. The
    * interest field is assigned to 0.0.
    */
    public BankAccount(double startBalance,
    double intRate)
    {
    balance = startBalance;
    interestRate = intRate;
    interest = 0.0;
    }


    /**
    * The deposit method adds the parameter
    * amount to the balance field.
    */
    public void deposit(double amount)
    {
    balance += amount;
    }

    /**
    * The withdraw method subtracts the
    * parameter amount from the balance
    * field.
    */
    public void withdraw(double amount)
    {
    balance -= amount;
    }


    /**
    * The addInterest method adds the interest
    * for the month to the balance field.
    */
    public void addInterest()
    {
    interest = balance * interestRate;
    balance += interest;
    }


    /**
    * The getBalance method returns the
    * value in the balance field.
    */
    public double getBalance()
    {
    return balance;
    }


    /**
    * The getInterest method returns the
    * value in the interest field.
    */
    public double getInterest()
    {
    return interest;
    }
    }


    /**
    *
    * Colorado State University – ITS-320 – Basic Programming
    *
    * This program demonstrates the BankAccount class.
    *
    * (Taken from "Starting Out with Java - Early Objects
    * (Third Edition) by Tony Gaddis, 2008 by Pearson Educ.)
    *
    * Programmed by: Reggie Haseltine, instructor
    *
    * Date: June 19, 2010
    *
    */
    import java.util.Scanner; // Needed for the Scanner class
    import java.text.DecimalFormat; // Needed for 2 decimal place amounts
    public class Program2 {
    public static void main(String[] args)
    {
    BankAccount account; // To reference a BankAccount object
    double balance, // The account's starting balance
    interestRate, // The annual interest rate
    pay, // The user's pay
    cashNeeded; // The amount of cash to withdraw

    // Create a Scanner object for keyboard input.
    Scanner keyboard = new Scanner(System.in);


    // Create an object for dollars and cents
    DecimalFormat formatter = new DecimalFormat ("#0.00");

    // Get the starting balance.
    System.out.print("What is your account's " + "starting balance? ");
    balance = keyboard.nextDouble();


    // Get the monthly interest rate.
    System.out.print("What is your monthly interest rate? ");
    interestRate = keyboard.nextDouble();

    // Create a BankAccount object.
    account = new BankAccount(balance, interestRate);

    // Get the amount of pay for the month.
    System.out.print("How much were you paid this month? ");
    pay = keyboard.nextDouble();

    // Deposit the user's pay into the account.
    System.out.println("We will deposit your pay " + "into your account.");
    account.deposit(pay);
    System.out.println("Your current balance is $" + formatter.format( account.getBalance() ));

    // Withdraw some cash from the account.
    System.out.print("How much would you like " + "to withdraw? ");
    cashNeeded = keyboard.nextDouble();
    account.withdraw(cashNeeded);

    // Add the monthly interest to the account.
    account.addInterest();

    // Display the interest earned and the balance.
    System.out.println("This month you have earned $" + formatter.format( account.getInterest() ) + " in interest.");
    System.out.println("Now your balance is $" + formatter.format( account.getBalance() ) );
    }
    }


    Compile the two test files (BankAccount.java first and then Program2.java second). Execute Program2 with the following inputs:
    starting balance - $500 (don't enter the dollar sign)
    monthly interest rate - 0.00125 (this is a 1.5% annual rate)
    monthly pay - $1000 (don't enter the dollar sign)
    withdrawal amount - $900 (don't enter the dollar sign)
    Verify that you earn $0.75 in interest and have an ending balance at the end of the month of $600.75.

    Then modify the BankAccount class's constructor method to create a BankAccount object which stores a monthly interest when the user inputs an annual interest rate of the format "nnn.nn" (i.e. 1.5). Note that the BankAccount constructor stored a monthly interest rate for the BankAccount object's instance field originally, but the user had to convert the annual rate to a monthly rate (i.e. 1.5 to 0.00125). Then modify the Program2 driver class to prompt the user for an annual interest rate. Recompile both classes and execute the modified Program2 driver class again, this time with following inputs:
    starting balance - $500 (don't enter the dollar sign)
    annual interest rate - 1.5
    monthly pay - $1000 (don't enter the dollar sign)
    withdrawal amount - $900 (don't enter the dollar sign)
    Verify that you still earn $0.75 in interest and still have an ending balance at the end of the month of $600.75 as you did with the original code.


    Submit only the modified source code files, final user inputs, and final output. Do not submit the original source code, inputs, and output.


    Be sure that you include the course, the program number, your name, and the date in your program header. Also include this information at the top of your Microsoft Word file. Include additional comments as necessary and maintain consistent indentation for good programming style as shown and discussed in our text.


    2) You may use the Windows Command Prompt command line interface or any Java IDE you choose to compile and execute your program.


    3) You are to submit the following deliverables to the Dropbox:
    a) A single Microsoft Word file containing a screen snapshot of your Java source code for both Program2.java and BankAccount.java (just the beginnings of the source code is OK) as it appears in your IDE (e.g. jGRASP, Net Beans, JDeveloper, etc.) or editor (e.g. a DOS "more" of the .java file's first screen).
    b) A listing of your entire modified version of the Java source code for Program2.java and BankAccount.java in the same Microsoft Word file as item a), and following item a).
    You can simply copy and paste the text from your IDE into Word. Be sure to maintain proper code alignment by using Courier font for this item. Do not submit the original source code files! c) A screen snapshot showing all of your program’s inputs and output in the same Microsoft Word file, and following item b) above.


    4) Your instructor may compile and run your program to verify that it compiles and executes properly.

    5) You will be evaluated on (in order of importance):
    a) Inclusion of all deliverables in Step #3 in a single Word file.
    b) Correct execution of your program. This includes getting the correct results with the modified class files!
    c) Adequate commenting of your code.
    d) Good programming style (as shown and discussed in the textbook's examples).
    e) Neatness in packaging and labeling of your deliverables.

    6) You must put all your screen snapshots and source code to a single Microsoft Word file.

    Learn More
  9. COMP274 Week 6 Programming Assignment The Calendar Program

    COMP274 Week 6 Programming Assignment The Calendar Program

    Regular Price: $25.00

    Special Price: $15.00

    COMP274 Week 6 Programming Assignment The Calendar Program


    The purpose of this lab is to give you a chance to use some of the data stream tools we have been discussing in a simple application. The assignment is to write a calendar application which allows the user to select a date, and either retrieve a previously stored calendar entry, or save a calendar entry.


    Your program should present a GUI interface which allows the user to specify the month, day, and year of the calendar entry. The GUI should also have a text area for displaying and editing a particular entry. It will also need two buttons, one for saving an entry, and the other for retrieving an entry.


    Required program elements:
    1. Your user interface must allow the user to enter the month, day, and year. You can do this using text fields for input, or you can use ComboBoxes if you feel adventurous.
    2. The only GUI components which create events that your program needs to handle are the save and retrieve buttons.
    3. Don’t go overboard making your GUI beautiful! We are just looking for basic functionality here!
    4. You must have a separate class which manages the calendar data. You will have a minimum of three classes in your application, a user interface class, the calendar manager class, and a calendar test class. The user interface class creates an instance of the calendar manager in its constructor and stores it in a member variable.
    5. The calendar manager must provide methods which support saving a specific calendar entry and retrieving a specific calendar entry. The interfaces must be defined to only pass a single day’s calendar entry across the interface.
    6. The calendar manager must store calendar data into files according to month+year. That is, the calendar entries for December 2011 must all be stored in the same file.
    7. The calendar manager must use ObjectInput/OutputStreams to read/write data from/to files. The calendar manager will use an array to store String objects. The position of a String in this array corresponds to the calendar entry for a specific day.
    8. The save method of the calendar manager will need to determine if a file exists for the requested month and year. If so, the object from that file must be read into the calendar manager. Otherwise, the calendar manager must create an empty String array. The new entry must be saved to the appropriate day’s location in the array. The modified array must be saved to the appropriate file.
    9. The retrieve method of the calendar manager will need to determine if a file exists for the requested month and year. If not, return an error string indicating that there is no such entry. If the file exists, read the String array from the file and locate the requested day’s entry. If this entry is null, return an error string indicating that there is no such entry, otherwise return the entry.


    Take screen shots of the output of your program. Paste the screen shots and your source code for your programs into a Word document. Submit your Word document.

    Learn More
  10. CMIS 141 Project 1

    CMIS 141 Project 1 Java Program

    Regular Price: $20.00

    Special Price: $15.00

    CMIS 141 Project 1 Java Program


    This project demonstrates your understanding of datatypes, input/output, sequential and selection programming statements, and mathematical operations.


    Before attempting this project, be sure you have completed all of the reading assignments listed in the syllabus to date, participated in the weekly conferences, and thoroughly understand the examples throughout the chapters. The project requirements include:


    1. Design and implement a Java program that will gather a user’s first name, middle initial, lastname, age in years, and 3 lucky numbers. The program should output the following based on the user’s input:
    a. A welcome message repeating their full name (e.g. Welcome John Q Smith)
    b. A message based on their age with these types of messages.
    Display “You are just a kid!”, if the user is less than or equal to 12 years old
    Display “Welcome teenager!”, if the user is greater than 12 and less than 20 years old
    Display “Welcome almost adult!”, if the user is 20 years old.
    Display “Welcome adult!” , if the user is 21 years old or greater.
    c. A message displaying the average of their 3 lucky numbers. For example “The average of your 3 lucky numbers is : 20”


    2. Additional requirements include:
    1. Use JOptionPane.showInputDialog() methods for your user to input their data
    2. Use JOptionPane.showMessageDialog() methods to display your messages.


    3. Include a comprehensive set of application test data that you used to test your program. Your test data can be shown in a table that includes input data, expected output, actual output and pass/fail results from the test. Your test data can be presented in the form of a table as follows:


    Submission requirements:
    Your deliverables include a Java file and a Word document. The Java file should be named Yournamep1.java. Your word document should include your test table and be named Yournamep1.doc. Your completed assignment should be submitted to your Project 1 assignment area no later than the due date listed in the calendar.

    Learn More

Items 31 to 40 of 177 total

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

Grid  List 

Set Descending Direction