Welcome to AssignmentCache!

Search results for 'Assignment'

Items 1 to 10 of 250 total

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

Grid  List 

Set Ascending Direction
  1. PRG 211 Week 1 Lab 3.8 Using math functions Program

    PRG 211 Week 1 Labs

    Regular Price: $15.00

    Special Price $12.00

    Lab 3.1 Formatted Output Hello World!

    Write a program the outputs 'Hello World!'


    Lab 3.2 Formatted output: No parking sign.

    Write a program that prints a formatted "No parking" sign. Note the first line has two leading spaces.
    NO PARKING
    1:00 - 5:00 a.m.


    Lab 3.3 House real estate summary

    Sites like Zillow get input about house prices from a database and provide nice summaries for readers. Write a program with two inputs, current price and last month's price (both integers). Then, output a summary listing the price, the change since last month, and the estimated monthly mortgage computed as (currentPrice * 0.045) / 12.

    Ex: If the input is 200000 210000, the output is:

    This house is $200000. The change is $-10000 since last month.
    The estimated monthly mortgage is $750.0.
    Note: Getting the precise spacing, punctuation, and newlines exactly right is a key point of this assignment. Such precision is an important part of programming.


    Lab 3.4 Caffeine levels

    A half-life is the amount of time it takes for a substance or entity to fall to half its original value. Caffeine has a half-life of about 6 hours in humans. Given caffeine amount (in mg) as input, output the caffeine level after 6, 12, and 18 hours.

    Ex: If the input is 100, the output is:

    After 6 hours: 50.0 mg
    After 12 hours: 25.0 mg
    After 18 hours: 12.5 mg
    Note: A cup of coffee has about 100 mg. A soda has about 40 mg. An "energy" drink (a misnomer) has between 100 mg and 200 mg.


    Lab 3.5 Divide by x.

    Write a program using integers userNum and x as input, and output userNum divided by x four times.

    Ex: If the input is 2000 2, the output is:

    1000 500 250 125
    Note: In Coral, integer division discards fractions. Ex: 6 / 4 is 1 (the 0.5 is discarded).


    Lab 3.6 Driving costs.

    Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the gas cost for 10 miles, 50 miles, and 400 miles.

    Ex: If the input is 20.0 3.1599, the output is:

    1.57995 7.89975 63.198
    Note: Small expression differences can yield small floating-point output differences due to computer rounding. Ex: (a + b)/3.0 is the same as a/3.0 + b/3.0 but output may differ slightly. Because our system tests programs by comparing output, please obey the following when writing your expression for this problem. First use the dollars/gallon and miles/gallon values to calculate the dollars/mile. Then use the dollars/mile value to determine the cost per 10, 50, and 400 miles.

    Note: Real per-mile cost would also include maintenance and depreciation.


    Lab 3.7 Simple statistics.

    Part 1
    Given 3 integers, output their average and their product, using integer arithmetic.

    Ex: If the input is 10 20 5, the output is:

    11 1000
    Note: Integer division discards the fraction. Hence the average of 10 20 5 is output as 11, not 11.666666666666666.

    Submit the above for grading. Your program will fail the test cases (which is expected), until you complete part 2 below but check that you are getting the correct average and product using integer division.

    Part 2
    Also output the average and product, using floating-point arithmetic.

    Ex: If the input is 10 20 5, the output is:

    11 1000
    11.666666666666666 1000.0


    Lab 3.8 Using math functions

    Given three floating-point numbers x, y, and z, output x to the power of y, x to the power of (y to the power of z), the absolute value of x, and the square root of (xy to the power of z).

    Ex: If the input is 5.0 6.5 3.2, the output is:

    34938.56214843421 1.2995143401732918e+279 5.0 262.42993783925596
    Hint: Coral has built-in math functions (discussed elsewhere) that may be used.


    Function Behavior Example
    SquareRoot(x) Square root of x SquareRoot(9.0) evaluates to 3.0.
    RaiseToPower(x, y) Raise x to power y: RaiseToPower(6.0, 2.0) evaluates to 36.0.
    AbsoluteValue(x) Absolute value of x AbsoluteValue(-99.5) evaluates to 99.5.

    Learn More
  2. IT 140 HigherLower Game Pseudocode Project One

    IT 140 Higher/Lower Game Pseudocode Project One

    Regular Price: $8.00

    Special Price $5.00

    IT 140 Higher/Lower Game Pseudocode Project One

    Higher/Lower Game Description
    Your friend Maria has come to you and said that she has been playing the higher/lower game with her three-year-old daughter Bella. Maria tells Bella that she is thinking of a number between 1 and 10, and then Bella tries to guess the number. When Bella guesses a number, Maria tells her whether the number she is thinking of is higher or lower or if Bella guessed it. The game continues until Bella guesses the right number. As much as Maria likes playing the game with Bella, Bella is very excited to play the game all the time. Maria thought it would be great if you could create a program that allows Bella to play the game as much as she wants.

    For this assignment, you will be designing pseudocode for a higher/lower game program. The higher/lower game program uses similar constructs to the game you will design and develop in Projects one and Two.

    1) Review the Higher/Lower Game Sample Output for more detailed examples of this game. As you read, consider the following questions:
    What are the different steps needed in this program? How can you break them down in a way that a computer can understand?
    What information would you need from the user at each point (inputs)? What information would you output to the user at each point?
    When might it be a good idea to use "IF" and "IF ELSE" statements?
    When might it be a good idea to use loops?

    2) Create a pseudocode that logically outlines each step of the game program so that it meets the following functionality:
    Prompts the user to input the lower bound and upper bound. Include input validation to ensure that the lower bound is less than the upper bound.
    Generates a random number between the lower and upper bounds
    Prompts the user to input a guess between the lower and upper bounds. Include input validation to ensure that the user only enters values between the lower and upper bound.
    Prints an output statement based on the guessed number. Be sure to account for each of the following situations through the use of decision branching:
    What should the computer output if the user guesses a number that is too low?
    What should the computer output if the user guesses a number that is too high?
    What should the computer output if the user guesses the right number?
    Loops so that the game continues prompting the user for a new number until the user guesses the correct number.

    OPTIONAL: If you would like to practice turning your designs into code, check out the optional 9.1 LAB: Higher/Lower Game in zyBooks. This step is optional but will give you additional practice turning designs into code, which will support your work in moving from Project One to Project Two.

    Learn More
  3. ITSD424 Unit 4 Famous Favorite Subs

    ITSD424 Unit 4 Famous Favorite Subs

    Regular Price: $10.00

    Special Price $8.00

    ITSD424 Unit 4 Famous Favorite Subs

    Continuing from the last assignment..
    Assignment Details
    Update the GUI application you have developed so far by adding a Java application to store the order just made by the customer in a file and present a file confirmation message using files and streams. You may accomplish this by outputting the sub order information to a file. Finally, you will read this file to display the order confirmation information.
    • Output user-entered data to a destination file using the file class.
    • Input data from a source file using the file class.
    • Use FileWriter class and PrintWriter class to output an order confirmation.

    Order Information
    Beverage: xxxx
    Sub bread: bbbbbbb
    Sub type: ttttttttttttt
    Sub size: ssssssss
    Customer Information
    Name: fffffff lllllll
    Address: aaaaaaaaaa
    City: ccccc
    State: ss
    Zip: zzzzz
    Phone: nnn-nnn-nnnn
    Input File: SubOrder.txt

    Learn More
  4. ITSD424 Unit 3 Famous Favorite Subs Input

    ITSD424 Unit 3 Famous Favorite Subs

    Regular Price: $10.00

    Special Price $8.00

    ITSD424 Unit 3 Famous Favorite Subs

    Continuing from the last assignment.
    Assignment Details

    Part 1
    Modify your Java application so that it is an easy-to-use GUI application where all of the interaction is performed on one screen. You will now take the individual components and translate them to a single interactive GUI interface using the following GUI components, container, the event listeners, and event subclasses to enhance your application as a more GUI-appropriate interface:
    • GUI components
    • Container
    • Event listeners
    • Event subclasses (at least 3–4 utilized)
    o ActionEvent
    o ItemEvent
    o FocusEvent
    o KeyEvent
    o MouseEvent
    o WindowEvent
    • ActionPerformed Method

    Part 2
    For this assignment, you are being asked to make sure you are exception handling by verifying that all of the customer-entered information is valid before the order is submitted to ensure order accuracy.
    The customer information that the customer must now enter that should be validated includes the following:
    • Entered username (must fill in a name)
    • Entered at least one sub to order
    • Selected all three attributes for sub (such as bread type, sub type, and sub size)
    • Entered delivery address that includes street, city, state, and zip code
    • Entered telephone number xxx-xxx-xxxx
    In this assignment, you are adding in error handling to make sure the customer is filling in all of the required information.
    To accomplish this task, you will be utilizing the following Java classes:
    • Methods in the character class and StringBuilder class to validate and manipulate characters in a string
    • Try.. Catch for the exception handling of all input fields

    Learn More
  5. ITSD424 Unit 2 Famous Favorite Subs Output

    ITSD424 Unit 2 Famous Favorite Subs

    Regular Price: $10.00

    Special Price $8.00

    ITSD424 Unit 2 Famous Favorite Subs

    Continuing from the last assignment.
    Use vector, wrapper classes, conversion, and collection data structures by writing and implementing Java code within your application that demonstrates each of these concepts.
    Hint: These may be utilized in areas of storing items in the customer order so that you can allow the customer to order more than one sub or beverage.
    Refer to the sample prototype for the various item lists you will use. Feel free to add more choices to each of these lists.

    Learn More
  6. ITSD424 Unit 1 Famous Favorite Subs Output

    ITSD424 Unit 1 Famous Favorite Subs

    Regular Price: $10.00

    Special Price $8.00

    ITSD424 Unit 1 Famous Favorite Subs

    We are developing this application
    1. User will choose from menu item
    2. User will review ordered items
    3. Each item will have a unit price
    4. Order details will show unit price plus total price
    5. Use will Press order button to place order

    For this Unit
    Assignment Description
    At this point, you are ready to start developing Java code to ask questions on customer information and the sub sandwich that customers want to order. You are only concerned with the functionality to request and provide feedback on what the customer entered.
    Your main focus is on defining your classes and abstract classes and utilizing the concept of inheritance and polymorphism for the final sub the customer orders. You will first prompt for the customer name and delivery address, like in this sample that prompts for the customer name:

    Then, you will prompt for the beverage, sub bread, sub type, and sub size.
    You should present a message echoing back all of the information that the customer entered, similar to the following example presenting the customer’s name with a message:

    Make sure you prompt for the four attributes (beverage, bread, type, and size) that you will need to request from the customer to define for the final sub and beverage selection. Also, be sure to comment all of your code to demonstrate that you understand what the code is doing.

    Learn More
  7. CIS355A Week 6 Lab - Database Connectivity Student Management System Add student

    CIS355A Week 6 Lab - Database Connectivity Student Management System

    Regular Price: $10.00

    Special Price $8.00

    CIS355A Week 6 Lab - Database Connectivity Student Management System

    OBJECTIVES
    • Programmatic access to a MySQL database to add and display records


    PROBLEM: Student Management System
    A teacher needs the ability to store and retrieve student data. This includes
    • student name;
    • three test scores;
    • average; and
    • letter grade.

    FUNCTIONAL REQUIREMENTS
    You can code the GUI by hand or use NetBeans GUI builder interface.
    Create a GUI which allows for input and display of student data.
    It should include buttons to save a record, display all records.

    Create a database and table to store student name and three test scores. (Note that average and grade are calculated by app.)

    Student class
    Create a Student class to manage the student data. It should have private instance variables of
    • student name; and
    • three test scores.
    The class must have the following methods.
    • A default and parameterized constructor
    • Sets/gets for all instance variables
    • A get method to calculate and return the average
    • A get method to calculate and return the letter grade
    • toString to display the name of the student

    StudentDB class
    Create a StudentDB class that is used to create a connection and interface with the database.

    This class should have two methods.
    • getAll - reads data from database, returns data in an arraylist of student objects
    • add - writes a record to the database

    GUI class
    Insert button will take the info from the GUI (student name and three test scores) and insert a record into the table.  Input should be cleared from the textboxes.
    Display button will read the data from the database and creates a report in Console window, sample format below.
    Name Test1 Test2 Test3 Avg Grade
    Bruce Wayne  90  95  98  94.3  A
    Clark Kent  65  70  90  75.0  C

    RUBRIC
    Student class
    • Has all required functionality 10
    GUI class
    • Student record can be saved
    • All student data can be displayed 15
    StudentDB class
    • add method inserts a record into db.
    • get method reads all records and returns in arraylist. 15
    Code style 5
    Lab Report 10
    TOTAL 55

    CODE STYLE REQUIREMENTS
    • Include meaningful comments throughout your code.
    • Use meaningful names for variables.
    • Code must be properly indented.
    • Include a comment header at beginning of each file, example below.
    /****************************************************
    Program Name: ProgramName.java
    Programmer's Name: Student Name
    Program Description: Describe here what this program will do
    ***********************************************************/

    DELIVERABLES
    Submit as a SINGLE zip folder
    • all java files; and
    • the Lab report.

    Follow assignment specification regarding class/method names.
    Note that your Java file name must match class name (DO NOT rename).

    Learn More
  8. CIS355A Week 5 Lab - File Processing Stocks4U FileReader

    CIS355A Week 5 Lab - File Processing Stocks4U

    Regular Price: $10.00

    Special Price $8.00

    CIS355A Week 5 Lab - File Processing Stocks4U

    OBJECTIVES
    • Add persistent data storage to your Week 4 Lab using text file input/output.

    PROBLEM: Stocks4U Portfolio Management System
    The portfolio management system you developed for Stocks4U needs the ability to save and restore a user’s data from a text file.

    FUNCTIONAL REQUIREMENTS
    You can code the GUI by hand or use NetBeans GUI Builder Interface.
    You will enhance Week 4 GUI to include
    • a File menu with menu items: open, save, exit; and
    • a label to display total portfolio value.

    Stock class
    • Modify the toString of Stock class to display as
    "Company: qty shares" (i.e., "Apple: 10 shares")

    StockIO class
    Create a StockIO class that is used to read from and write to a text file using an ArrayList. Make sure to use a delimiter between the fields; it does not have to be the # character. Example format of the file is:

    Apple#100#55.0#80.0
    Intel#50#75.0#70.0

    This class should have two methods.
    • getData - reads data from file, returns data in array list of stock objects
    • saveData - writes data from an array list to the file in proper format
    The file name will be an instance variable that you can set with a parameterized constructor, or with a separate method.

    GUI class
    Note that you will need to add an ArrayList to your GUI class to manage the data to/from the file. It will act as a parallel array to your DefaultListModel. Any time you add a stock, you must add it in BOTH places. Any time you remove a stock, you must remove it in BOTH places.

    File - open should prompt for file name using JOptionPane, read the file and populate the JList.
    File - save should prompt for file name to save data from JList to.
    File - exit should exit the program.

    The total value of the portfolio should be displayed at all times and updated anytime a stock is added or removed.

    RUBRIC
    Stock class toString modified 5
    GUI class
    • Menu is added.
    • Label is added for total portfolio value.
    • Open menu item reads data from a file and displays in list box.
    • Save menu item writes data to a text file in proper format.
    • Total value is updated whenever any changes are made to stocks (add, remove, open a new file). 15
    StockIO class
    • getData method reads from file to array list
    • saveData method writes from array list to file 20
    Code style 5
    Lab Report 10
    TOTAL 55

    CODE STYLE REQUIREMENTS
    • Include meaningful comments throughout your code.
    • Use meaningful names for variables.
    • Code must be properly indented.
    • Include a comment header at beginning of each file, example below.
    /****************************************************
    Program Name: ProgramName.java
    Programmer's Name: Student Name
    Program Description: Describe here what this program will do
    ***********************************************************/

    DELIVERABLES
    Submit as a SINGLE zip folder
    • all Java files; and
    • the Lab report.

    Follow assignment specification regarding class/method names.
    Note that your Java file name must match class name (DO NOT rename).

    Learn More
  9. CIS355A Week 4 Stocks4U Portfolio Management System Add stock

    CIS355A Week 4 Lab - Processing Arrays of Objects Stocks4U

    Regular Price: $12.00

    Special Price $10.00

    CIS355A Week 4 Lab - Processing Arrays of Objects Stocks4U

    OBJECTIVES
    • Create a GUI that uses JList and JTabbedPanes.
    • Process multiple objects in an ArrayList.
    • Code event handlers for multiple events.

    PROBLEM: Stocks4U Portfolio Management System
    Stocks4U needs to develop an app for you to manage your stock purchases. You should be able to store a list of stock purchases, view the individual stocks, add and remove stocks.

    FUNCTIONAL REQUIREMENTS
    You can code the GUI by hand or use NetBeans GUI builder interface.

    The GUI should have two tabs using JTabbedPane.
    • One tab ("Show stocks") should have
     o a JList to display all the stock purchases;
     o a text field or label to display information about a particular stock; and
     o a JButton to remove a stock.
    • One tab ("Add stock") should have textboxes, labels, and a button to input a stock.

    Create a Stock class to manage the stock activity. It should have private instance variables of
    • company name;
    • number of shares;
    • purchase price; and
    • current price.
    Create a default and parameterized constructor.
    Create sets/gets for all instance variables.
    Create a get method to calculate and return the profit or loss. This would be calculated as
     Number of shares * (current price – purchase price).
    Create toString to display the name of the stock.

    As you add stocks, they are displayed in the JList.
    If you select an element in the JList, the gain or loss is displayed in the label or text field.
    If you select an element in the JList and click Remove, the stock is removed from the list.

    GRADING RUBRIC
    Stock class
    • Has all required functionality 15
    GUI class
    • Use the Stock class to process data.
    • As you add stocks, they are displayed in the JList.
    • If you select an element in the JList, the gain or loss is displayed in the label or text field.
    • If you select an element in the JList and click Remove, the stock is removed from the list.
    • Use error messages for any invalid/missing user input using JOptionPane. 25
    Code style 5
    Lab Report 10
    TOTAL 55

    CODE STYLE REQUIREMENTS
    • Include meaningful comments throughout your code.
    • Use meaningful names for variables.
    • Code must be properly indented.
    • Include a comment header at beginning of each file, example below.
    /****************************************************
    Program Name: ProgramName.java
    Programmer's Name: Student Name
    Program Description: Describe here what this program will do
    ***********************************************************/

    DELIVERABLES
    Submit as a SINGLE zip folder
    • All java files
    • Lab report

    Follow assignment specification regarding class/method names.
    Note that your java filename must match class name (DO NOT rename).

    Learn More
  10. CIS355A Week 3 Lab BurgersRUs - Enhanced GUI Application using Additional Swing Components

    CIS355A Week 3 Lab - Enhanced GUI Application using Additional Swing Components

    Regular Price: $12.00

    Special Price $10.00

    CIS355A Week 3 Lab - Enhanced GUI Application using Additional Swing Components

    OBJECTIVES
    • Create a GUI that uses JCheckBox, JRadioButton, JTextArea, and menus.
    • Process multiple events.

    PROBLEM: BurgersRUs Point of Sale system
    Burger Barn needs a point of sale application. The products and prices are as follows.
    Burgers: single $3.50, double $4.75
    Add cheese: +$.50
    Add bacon: +$1.25
    Make it a meal: +$4.00

    FUNCTIONAL REQUIREMENTS
    You can code the GUI by hand or use NetBeans GUI builder interface.
    The GUI should use JRadioButton to choose single or double burger.
    • Single burger
    • Double burger
    It should use JCheckBox for add ons.
    • Add cheese
    • Add bacon
    • Make it a meal
    JTextField for item price, order quantity, order total
    JTextArea to display the receipt
    Create a menu with the following options.
    File  Order
    Exit  Add to Order
      Clear for next item
      New Order

    As the user selects items, the item price should be calculated and updated accordingly.
    Note that quantity should default to 1. The user can change if needed.
    Once choices are made and quantity is entered, process the order using the menu options.
    Order—Add  to Order Displays the choice and price in each text area.
       Note that multiple items can accumulate in a single order Updates the order total
    Order—Clear for next item Clears the checkboxes. Note that quantity should default to 1
    Order—New  Order Clears the GUI and totals for a new order
    File—Exit  Exits the program. Use System.exit(0) commad.

    GRADING RUBRIC
    Functional Requirements
    All components on GUI created correctly
    Item price updated properly with radio and checkbox selections
    Items added to text area
    Total price accumulates correctly
    Clear for next item works correctly
    Clear for new order works correctly
    All prices displayed with two decimal places
    File exit works correctly
    Error messages for any invalid/missing user input using JOptionPane 40
    Code style 5
    Lab Report 10
    TOTAL 55

    CODE STYLE REQUIREMENTS
    Include meaningful comments throughout your code.
    Use meaningful names for variables.
    Code must be properly indented.
    Include a comment header at beginning of each file, example below.
    /****************************************************
    Program Name: ProgramName.java
    Programmer’s Name: Student Name
    Program Description: Describe here what this program will do
    ***********************************************************/

    DELIVERABLES
    Submit as a SINGLE zip folder
    All java files
    Lab report

    Follow assignment specification regarding class/method names.
    Note that your java filename must match class name (DO NOT rename).

    Learn More

Items 1 to 10 of 250 total

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

Grid  List 

Set Ascending Direction
[profiler]
Memory usage: real: 14942208, emalloc: 14321160
Code ProfilerTimeCntEmallocRealMem