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 1 to 10 of 12 total

per page
Page:
  1. 1
  2. 2

Grid  List 

Set Ascending Direction
  1. CIS355A Week 5 iLab 5 Step 1 Write Clients to File

    CIS355A Week 5 iLab GUI Graphics and File I/O

    Regular Price: $25.00

    Special Price: $20.00

    CIS355A Week 5 iLab GUI Graphics and File I/O


    Scenario/Summary
    In this lab, you will create one project that reads from a file, one project that writes to a file, and one project drawing a snowman.


    iLAB STEPS
    STEP 1: Writing out Client Information
    1) Create the following GUI, so that when your program is running, your user can input information regarding a client and hit the save button to save the information out to a file.
    2) Every time the user hits the save button, that information should be saved out to a file called client.txt; each new client's information should append to the information already saved onto the file client.txt.
    3) The data in the client.txt file should be formatted like the following.
    Client Activity Report
    Client Name Client ID Starting Balance Closing Balance
    XXXXXXXXX 9999999 99999.99 99999.99
    XXXXXXXXX 9999999 99999.99 99999.99
    XXXXXXXXX 9999999 99999.99 99999.99

    STEP 2: Reading in Client Information
    1) Create a class called Client, the Client class must contain attributes for Client name, Client ID, starting balance, and closing balance, and all other accessor/mutator/constructor functions as necessary.
    2) Assume you have a client.txt file with the following sample information.
    Charles Smith|100235|5700.75|1200.00
    James Peterson|320056|349.56|4005.56
    Francis Lewis|400556|7500.00|456.23
    William Burgess|45399|5000.00|1245.56
    Philip Wilson|10090|10000.00|2300.75
    James Brown|34291|25000.45|31454.86
    3) Create a Client ArrayList to process input records in main().
    4) Use a for loop to read in the information from client.txt.
    5) The GUI to this program should look similar to this:
    6) Once the user hits the display button, everything read in from the file should display in the Console window in this format.
    Client Activity Report
    Client Name Client ID Starting Balance Closing Balance
    XXXXXXXXX 9999999 99999.99 99999.99
    XXXXXXXXX 9999999 99999.99 99999.99
    XXXXXXXXX 9999999 99999.99 99999.99


    STEP 3: Snowman!
    Use the many draw methods provided to you by Java and draw a Snowman—be as creative or as basic as you would like, as long as the final result resembles a snowman. It doesn't have to necessarily look exactly like this, but this is the minimum you should achieve with your drawing.
    1) You must have at least three circles in your project.
    2) You must have at least a line, a polygon, an oval, or a rectangle.
    3) In addition to your snowman, you should also use drawString to draw some text.
    4) Use draw or fill and the color class as you see fit.
    Hint: frame.getContentPane().setBackground(Color.blue); //This is the code you need to set the frame's background color. Have Fun!

    Learn More
  2. Travel Agents System Java Program

    Travel Agents System Java Program

    Regular Price: $30.00

    Special Price: $25.00

    Travel Agents System Java Program


    You are to develop program in Java for a small travel agents. The company arranges holidays from four UK airports to five international destinations. Users need to find flight times and costs for journeys between these destinations. The system also provides information on hotels at the destinations (name of hotel and cost per person per night). Information on hotels can only be added, or loaded from file, when the program is running. The following table (Table 1) provides the airport names, destinations, costs and flight times for the journeys Table 1 Information for the travel agents program – the two values represent cost (£) and flight time (hours) respectively – you can make up your own (realistic values) if you wish


    Airport/Destination | New York |Dahab | Rome |Sydney |Tokyo
    East Midlands |200/5.0 |150/4.0 |100/1.0 |500/22.0 |400/12.0
    Birmingham |190/4.8 |140/3.5 |95/1.1 |480/22.5 |380/12.5
    Heathrow |195/4.9 |140/3.6 |95/1.1 |490/23.0 |390/12.5
    Manchester |210/5.5 |145/3.7 |110/1.2 |470/22.7 |370/12.6


    (the above is a data table, where there is a line, represents the cell)


    Your program should have a main menu with four options – Time, Price, Hotels and End (which terminates the program). The Hotels option takes the user to another (Hotel) menu with the following six options – View Hotels; Add Hotel; Delete Hotel; Save Hotels; Retrieve Hotels; Exit (back to the previous menu). Note that your program should include appropriate error trapping – for example, entering an invalid date (eg 30 February).
    Functionality for each of these menu options is explained below:
    Time – Provides the flight time presented in hours.
    Price – The cost of travelling from an airport to a given destination (both selected by the user). Note, if the customer is travelling on the last day of the month the fare should be increased by 5% (and display a message to say that this has been done). The system will therefore need to ask the user the date of travel. It should not simply ask the user if it is the end of the month – but work this out from a date provided by the user.
    Hotels – Takes the user to a Hotels Information Menu.
    Hotels menu
    View Hotels – The user selects a destination and the system displays all available hotels at that destination including the overnight cost per person. If there are no hotels for a destination it should display a message to say so.
    Add Hotel – Allows the user to add a hotel for a given destination. This should add to the list of existing hotels for that destination (if there are any). For example, I might add 'Belle Vue' as a hotel in Sydney at a cost of £50 per person per night.
    Delete Hotel – Allows the user to delete a hotel from a list of hotels at a destination.
    Save Hotels – save all the information on all hotels to a single file in a format of your choosing.
    Retrieve Hotels – read in all the information on hotels from a user selected file (a file saved using the previous option). This should overwrite any existing hotel data in the program when it is running.


    Marking
    The more functionality you add to the program the higher your mark. Begin by getting the menu options in place then add functionality to your program in the following order (make sure that earlier parts of the system are working properly before moving on). Your program should also be structured in an object oriented way. You should try to identify and implement a number of classes for this program.


    Minimum pass (40%)
    The flight time between any airport and destination;
    The cost of travel between any airport and destination;
    Increased cost of travel on the last day of the month and a message to say this has been applied;


    40%-70%
    View hotels – users can view information on all hotels at a chosen destination; Add hotel – the ability for users to add hotels for a destination;
    Sort hotels – users can sort all hotels alphabetically;


    Documentation
    Your coursework should be submitted with appropriate documentation. You should include class diagrams, designs, functionality not completed, functionality working, test plans, evaluation, and program listings. Make sure you include an explanation of how your code should be run (eg. which file should be compiled and run and anything I need to know about using the program – a user guide).

    Learn More
  3. CIS355A Week 3 iLab InheritanceTest Java Program

    CIS355A Week 3 iLab InheritanceTest and Greeting Java Program

    Regular Price: $25.00

    Special Price: $20.00

    CIS355A Week 3 iLab InheritanceTest and Greeting Java Program


    Scenario/Summary
    In this lab, you will create one project that uses inheritance and one simple Applet.


    Deliverables
    Program files for each of the following programs
    1. InheritanceTest; and
    2. Greeting.


    iLAB STEPS
    Step 1: InheritanceTest
    Implement an inheritance hierarchy based on the following specifications for Account class, Checking Account class, and Savings Account class:
    Account class
    • Methods:
    o processDeposit ( ) - accepts a single double parameter containing the deposit amount. Updates the balance by adding the deposit amount to the balance.
    o processWithdrawal ( ) - accepts a single double parameter containing the withdrawal amount. Updates the balance by subtracting the withdrawal amount for the balance. Note: For now do not worry about negative balances.
    o calcInterest ( ) - Coded as a double method with an empty body.
    • Attributes:
    o String Account Name
    o Integer Account ID
    o Double balance
    • Constructor
    o Prompt the user and accept input for the Account Name, Account ID and the initial balance.
    The CheckingAcct class which is a derived class of the Account class.
    • Attributes:
    o Inherits all the attributes of the Account class.
    o The overDraftFee is double and is populated in the constructor of the CheckingAcct class.
    • Methods:
    o calcInterest () - If the account balance is greater than or equal to 3000.00 an interest rate of 1% or .01 is applied to increase the balance.
    • Constructor:
    o Prompt the user for the OverDraftFee.
    The SavingsAcct class which is a derived class of the Account class.
    • Attributes:
    o Inherits all the attributes of the Account class.
    o There are no other attributes.
    • Methods:
    o calcInterest ( ) - If the account balance is greater than or equal to 5000.00 an interest rate of 4% or .04 is applied to increase the balance. If the balance is greater than or equal to 3000.00 an interest rate of 3% or .03 is applied to increase the balance. Otherwise use an interest rate of 2%. The new balance is returned to the calling program.
    • Constructor:
    o Inherited from the Account class. (no code needed)
    Main:
    Prompt the user for the bank name and routing number. Create at least two account objects (each of a different type). Process a deposit then withdraw then calculate the interest for each account. Generate the following report:
    Bank Name: XXXXXXXX Routing Number: XXXXXX
    Account Name: XXXXXX Account ID: XXXXXXXXX Balance: 9999.99
    Account Name: XXXXXX Account ID: XXXXXXXXX Balance: 9999.99


    Step 2: Greeting
    Create an applet of size 500 by 500. The background color of the applet should be yellow. The four components to be included are
    1. a Label object that has the text "Please enter your name;"
    2. a Textfield object of size 20;
    3. a Button object with the text "GREET;" and
    4. a Label object with the text "Result goes here." This label will change to "Hello," followed by the entered name.
    For this lab, you will need the actionPerformed method to provide event handling for the button.
    The getText() method will be needed to get the string from the TextField.
    The setText() method will be needed to change the text of the second Label.
    Test your applet by entering your full name and confirming that the result label has changed.

    Learn More
  4. CIS355A Week 6 iLab 6 Java Pizza Swing

    CIS355A Week 6 iLab Swing and Database Connection

    Regular Price: $25.00

    Special Price: $20.00

    CIS355A Week 6 iLab Swing and Database Connection

    iLAB OVERVIEW
    Scenario/Summary
    Develop one application using JTabbedPanes and JFrames and another application that connects to a MySQL database.
    Deliverables
    1. JavaPizza
    2. ContactList

    iLAB STEPS
    Step 1: JavaPizza
    Develop an application using a JTabbedPane to order a pizza. You will need to ask the customer for their name and phone number. You will ask for the size (choose one) and toppings (choose many) and compute the total. After computing the total, provide a button to display the order summary, which includes the name, phone number, size, toppings, and total. The prices are listed below. Screenshots of a possible solution are included. Your application must include four tabs and open a new window when the button is clicked.
    • Small:  8.00
    • Medium: 10.00
    • Large: 12.00
    Each topping is 2.00 extra.
     
    JavaPizza    Points    Description
    Standard header included    1    Must contain program's name, student name, and description of the program
    Program compiles    1    Program does not have any error
    Program executes    1    Program runs without any error
    Created the JTabbedPane with four tabs    4    The JTabbedPane is displayed with the four required tabs and components on each tab
    Total is calculated correctly    5    The total on the last tab is calculated correctly based on information supplied.
    Order summary window displayed correctly    8    The order summary window is displayed with a JTextArea, including all information from the four tabs.
    Subtotal    20      
     
    Step 2: Contact List
    Develop a Java application to add a contact into the contact table, and display all contacts in the contact table. The contact table contains two columns, FullName, and PhoneNumber. Both values are text data. Use JOptionPanes to ask for the contact data, and display a confirmation message when the contact is added. Display the list of contacts in the console. Screenshots of a possible solution are included.
     
    ContactList    Points    Description
    Standard header included    1    Must contain program's name, student name, and description of the program
    Program compiles    1    Program does not have any error
    Program executes    1    Program runs without any error
    Created the JOptionPanes for input    6    Two JOptionPanes are displayed to retrieve input
    JOptionPane displayed upon insert    4    A JOptionPane is display to confirm the contact was added
    ContactList shown in console    7    The list of contacts is displayed in the console under a heading contact list .
    Subtotal    20

    Learn More
  5. CMIS 242 Project 4 Color Menu

    CMIS 242 Project 4 Color Menu

    Regular Price: $25.00

    Special Price: $20.00

    CMIS 242 Project 4 Color Menu


    This project focuses on demonstrating your understanding of Java Collections. 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.
    Write a Java application that effectively uses Collections to store custom color definitions (between 5 and 20, inclusive).
    The user should assign a unique name to each color, and a unique hexadecimal value (e.g., red is #FF0000).
    User input can be done in a GUI or on the command-line.
    Your program should enforce uniqueness. In other words, if the user enters a name for a color that already has that name, then the user should be reprompted. (Same behavior for the hexadecimal value.)
    Additionally, a GUI should be included that displays the color names and hexadecimal values.
    Each name/value pair should be selectable via a radio button or other mechanism.
    When a color is selected, an area of the GUI should change to that color (the area is up to you, as long as it's visible).

    Learn More
  6. Introduction To Java 9th Edition Chapter 22 Exercise 13 The 24-point game Success

    Introduction To Java 9th Edition Chapter 22 Exercise 13 The 24-point game

    Regular Price: $25.00

    Special Price: $20.00

    Introduction To Java 9th Edition Chapter 22 Exercise 13 The 24-point game


    (Game: the 24-point card game) The 24-point game is to pick any 4 cards from 52 cards, as shown in Figure 22.19. Note that the Jokers are excluded. Each card represents a number. An Ace, King, Queen, and Jack represent 1, 13, 12, and 11, respectively. You can click the Refresh button to get four cards. Enter an expression that uses the four numbers from the four selected cards. Each number must be used once and only once. You can use the operators (addition, subtraction, multiplication, and division) and parentheses in the expression. The expression must evaluate to 24. After entering the expression, click the Verify button to check whether the numbers in the expression are currently selected and whether the result of the expression is correct. Display the verification in a dialog box. Assume that images are stored in files named 1.png, 2.png, . . . , 52.png, in the order of spades, hearts, diamonds, and clubs. So, the first 13 images are for spades 1, 2, 3, . . . , and 13.

    Learn More
  7. CMIS 141 Project 3 Stringed Musical Instrument Java Class

    CMIS 141 Project 3 Stringed Musical Instrument Java Class and UML class diagram

    Regular Price: $25.00

    Special Price: $20.00

    CMIS 141 Project 3 Stringed Musical Instrument Java Class and UML class diagram


    This project focuses on demonstrating your understanding of classes and objects. 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 stringed musical instrument class using the following guidelines:
    a. Data fields for your instrument should include number of strings, an array of string names representing string names (e.g. E,A,D,G), and boolean fields to determine if the instrument is tuned, and if the instrument is currently playing. You are welcome to add additional data fields if you like.
    b. A constructor method that set the tuned and currently playing fields to false.
    c. Other methods 1) to tune the instrument, 2) to start the instrument playing, and 3) to stop the instrument from playing.
    d. Other methods as you see fit (Add at least one unique method).


    2. Create a UML class diagram using a diagram tool (e.g. PPT, Visio) of your choice. Prepare the diagrams and place them in a word document along with a brief description of each of your classes.


    3. Create Java classes for your instruments. Be sure that your code matches your design specifications and some minimal functionality is included. For example, if you called the violin.play() method, you should at least print that the violin is playing. Similar functionality should be supplied when you stop playing, tune or call any of your methods. For example:


    public void playviolin() {
    System.out.println("The violin is now playing.");
    }


    4. Write the output from your Instrument class methods to a text file that a user entered from the command line arguments (e.g. java Mynamep3tst myfilename.txt). This allows your program to accept filenames from the user via a command line argument.


    5. Finally, create a Java test class that simulates using your instrument class. In your test class be you should at a minimum: a) Construct 10 instances of your instrument, b) tune your instruments, c) Start playing your instrument, d) Call your unique method, and e) Stop playing your instruments. (Hint: Arrays and Loops will make your job easier and result in more efficient code!)


    6. Your programs should compile and run without errors.


    7. Be sure to test your program carefully. Provide a list of comprehensive test cases used to validate your application and include these test cases in your word document containing your UML diagrams and descriptions. Similar to Project 1, your test data can be shown in a table that includes input data, expected output, actual output and pass/fail results from the test.

    Learn More
  8. CIS355A Week 4 iLab Quick Fast Car Care Application

    CIS355A Week 4 iLab Quick Fast Car Care Application

    Regular Price: $25.00

    Special Price: $20.00

    CIS355A Week 4 iLab Quick Fast Car Care Application


    iLAB STEPS
    Step 1: Quick Fast Car Care Application
    Quick Fast Car Care is a small business that specializes in oil changes and car washes. Their strategic advantage is providing quick service. To provide quick service, this owner wants a new application that will calculate services provided to customers. The table below has the services and the cost of these services.


    Oil Change Cost
    Bronze $20
    Silver $25
    Gold $30

    Car Wash Cost
    Basic $5
    Better $10
    Best $15


    Your manager wants you to create a prototype Java application using menus that will calculate the cost of a customer getting an oil change, car wash, or both. This application should add the appropriate amount to the total cost when services are provided. When the total menu item is selected, a message box should display the services purchased and the total amount. Allow the client to use the clear menu item to wipe out the memory and start fresh for a new customer. The exit menu item should close the application. Use the screen designs below to model your application.

    Learn More
  9. CIS355A Week 7 Course Project Flooring Application User Manual and Application Code

    CIS355A Week 7 Course Project Flooring Application User Manual and Application Code

    Regular Price: $25.00

    Special Price: $20.00

    CIS355A Week 7 Course Project Flooring Application User Manual and Application Code


    Your application must include at least three tabs. The user will choose wood flooring or carpet, enter the length and width of the floor, as well as the customer name and address. The application will compute the area of the floor and the cost of the flooring considering that wood floor is $20 per square foot and carpet is $10 per square foot. A summary should be displayed, either in a tab or another window, listing the customer name and address, floor selection, area, and cost. This information should also be stored in the MySQL database table. The program should validate that all information is entered and that the length and width are numeric values. Any numeric or currency values must be formatted appropriately when output. Recommendations for the components used for input are
    • radio buttons—flooring type (wood or carpet);
    • text fields—customer name, customer address, floor length, and floor width; and
    • buttons—calculate area, calculate cost, submit order, display order summary, display order list.
    The MySQL database table is called flooring and has the following description.
    Field Type
    CustomerName varchar(30)
    CustomerAddress varchar(50)
    FlooringType varchar(10)
    FloorArea Double
    FloorCost Double
    In addition to entering new customer orders, your application should list all customer orders stored in the database. These will be viewed as a list, in a text area, and will not be updated by the user.


    User Manual (Due Week 7)
    Your actual Course Project and user manual are due at the end of Week 7. However, it is strongly recommended that you start your project in Week 5 to avoid many last minute issues.
    In Week 7, you will be required to submit a user manual, as well as your Java code. The user manual can be a simple Word document with screenshots that explains how to run your application. Your mark will depend both on the program quality and the quality of the user manual.
    Here are some more detailed guidelines about the user manual.
    It does not need to be long, probably not more than 5 pages, including screenshots.
    Write at the expected user's level, not too technical.
    Detail all the functionality that the application provides.
    For each function, show what is its purpose and sample execution, with a screenshot.


    User Manual Points Description
    Sufficient length to describe the application 5 Manual contains explanation in detail of all relevant areas of the application
    Contains screenshots of the key interface components 5 Images of each section of the application
    Operations are explained 5 Detailed operation of each section of the application
    Written to the user's level and is not technical 5 Must not contain code or any other technical items irrelevant to the users
    Subtotal 20


    Application Code (Due Week 7)
    The following grading rubric will be used for the code portion of the project.
    Flooring Application Points Description
    Standard header included 2 Must contain program name, student name, and description of the program
    Program compiles 2 Program does not have any error
    Program executes 2 Program runs without any error
    Includes at least 3 tabs 10 Three or more tabs are used
    Includes components for all required inputs 35 Components for customer name, address, floor type, length, width, area and cost with buttons to calculate area, calculate cost, display order summary, and display order list are included
    Area calculation 4 Area is calculated correctly
    Cost calculation 5 Cost is calculated correctly
    Included data validation 10 If no values or non-numeric values are entered, the proper error message should display.
    Correct data is stored in the database table 10 When values are entered, the data is stored correctly in the database table.
    Customer orders are displayed in a list 10 All records saved to the database are displayed in a list with appropriate formatting.
    Correct output is displayed 10 When values are entered, the order summary is shown with appropriate formatting.
    Total 100

    Learn More
  10. CIS355A Week 2 iLab StudentGPAInfo Java Program

    CIS355A Week 2 iLab StudentGPAInfo and CurrencyConversion Java Program

    Regular Price: $25.00

    Special Price: $20.00

    CIS355A Week 2 iLab StudentGPAInfo and CurrencyConversion Java Program


    In this lab, you will create two programs that use classes and methods.
    Deliverables
    Program files for the following program
    StudentGPAInfo
    CurrencyConversion


    STEP 1: StudentGPAInfo (20 points)
    Create a class called StudentGPAInfo.java that contains one double-precision instance variables named gpa. It should also contain two integer instance variables named totalgradepoints and numberofclasses. Finally, there should be one instance variable named studentname of string type. The class should include a constructor that initializes the name, numberof classes, and totalgradepoints variables, as well as a default constructor. Also, you need an instance method named calculateGPA() that calculates the student's grade point average by using this formula: totalgradepoints divided by numberofclasses. Also, you need an instance method. Create one set method that will assign values to the studentname, totalgradepoints, and numberofclasses variables. Create a displayStudent method that will display all of the attributes of the StudentGPAInfo object. Display the GPA with an accuracy of two decimal places (i.e., 3.25).


    Write a class called GPATest.java. Create one StudentGPAInfo object named student1 using constructor that allows you to pass values to the object. Pass any values you would like to use. Create another StudentGPAInfo object named student2 using the default constructor. Using the set method, assign values to the student2 object. Next, use the calculateGPA() methods on both objects, then invoke the displayStudent() method on each of the objects.


    STEP 2: CurrencyConversion (20 points)
    You must create a program named CurrencyConversion.java that converts money between the following currencies.
    Given one of the three currencies, the program should convert the input amount into one of the other currencies. For example, if you input one (1) U.S. dollar, and you decide to convert that one dollar to a pound, then the output should be .60.
    Using the JOptionPane GUI, do the following.
    Prompt the user for the currency code type.
    Prompt the user for the amount of that currency.
    Prompt the user for the currency code that the entered amount must be converted to.
    Using the table above, the following formula was used to convert USD to JPY.
    10.00 * 103.73 = 1,037.30
    Display the results in a JOptionPane message box.

    Learn More

Items 1 to 10 of 12 total

per page
Page:
  1. 1
  2. 2

Grid  List 

Set Ascending Direction