Search results for 'WK9D1 apply your knowledge Chapter 5: Apply Your Knowledge – Adding Fields Babbage CPA Firm database'
Maximum words count is 10. In your search query was cut next part: Adding Fields Babbage CPA Firm database.
-
PRG/420 Week 5 Java 5.20 LAB: Acronyms
Regular Price: $7.00
Special Price $3.00
PRG/420 Week 5 Java 5.20 LAB: Acronyms
An acronym is a word formed from the initial letters of words in a set phrase. Write a program whose input is a phrase and whose output is an acronym of the input. If a word begins with a lower case letter, don't include that letter in the acronym. Assume there will be at least one upper case letter in the input.
Ex: If the input is Institute of Electrical and Electronics Engineers, the output should be:
IEEEYour program must define and call a method thats returns the acronym created for the given userPhrase.
public static String CreateAcronym(String userPhrase)Hint: Refer to the ascii table to make sure a letter is upper case.
Learn More -
PRG/420 Week 5 Java 5.19 LAB: Remove spaces - methods
Regular Price: $7.00
Special Price $3.00
PRG/420 Week 5 Java 5.19 LAB: Remove spaces - methods
Write a program that removes all spaces from the given input.
Ex: If the input is:
Hello my name is John.
the output is:
HellomynameisJohn.Your program must define and call the following method. The method should return a string representing the input string without spaces.
public static String removeSpaces(String userString)Note: This is a lab from a previous chapter that now requires the use of a method.
Learn More -
PRG/420 Week 5 Java 5.18 LAB: Flip a coin
Regular Price: $7.00
Special Price $3.00
PRG/420 Week 5 Java 5.18 LAB: Flip a coin
Write a program that simulates flipping a coin to make decisions. The input is how many decisions are needed, and the output is either heads or tails. Assume the input is a value greater than 0.
Ex: If the input is:
3
the output is:
tails
heads
tailsFor reproducibility needed for auto-grading, seed the program with a value of 2. In a real program, you would seed with the current time. In that case, every program's output would be different, which is what is desired but can't be auto-graded.
Note: A common student mistake is to create an instance of Random before each call to rand.nextInt(). But seeding should only be done once, at the start of the program, after which rand.nextInt() can be called any number of times.
Your program must define and call the following method that returns "heads' or 'tails".
Learn More
public static String headsOrTails(Random rand) -
PRG/420 Week 5 Java 5.17 LAB: Max magnitude
Regular Price: $7.00
Special Price $3.00
PRG/420 Week 5 Java 5.17 LAB: Max magnitude
Write a method maxMagnitude() with two integer input parameters that returns the largest magnitude value. Use the method in a program that takes two integer inputs, and outputs the largest magnitude value.
Ex: If the inputs are:
5 7
the method returns:
7Ex: If the inputs are:
-8 -2
the method returns:
-8Note: The method does not just return the largest value, which for -8 -2 would be -2. Though not necessary, you may use the absolute value built-in math method.
Your program must define and call a method:
Learn More
public static int maxMagnitude(int userVal1, int userVal2) -
PRG/420 Week 5 Java 5.16 LAB: Step counter
Regular Price: $7.00
Special Price $3.00
PRG/420 Week 5 Java 5.16 LAB: Step counter
A pedometer treats walking 2,000 steps as walking 1 mile. Write a program whose input is the number of steps, and whose output is the miles walked.
Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
System.out.printf("%.2f", yourValue);Ex: If the input is:
5345
the output is:
2.67Your program must define and call a method:
Learn More
public static double stepsToMiles(int userSteps) -
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 55CODE 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 reportFollow assignment specification regarding class/method names.
Learn More
Note that your java filename must match class name (DO NOT rename). -
PRG/420 Week 4 Java 4.15 LAB: Elements in a range
Regular Price: $7.00
Special Price $3.00
PRG/420 Week 4 Java 4.15 LAB: Elements in a range
Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Assume that the list will always contain fewer than 20 integers.
That list is followed by two more integers representing lower and upper bounds of a range. Your program should output all integers from the list that are within that range (inclusive of the bounds). For coding simplicity, follow each output integer by a space, even the last one. The output ends with a newline.Ex: If the input is:
Learn More
5 25 51 0 200 33 0 50
then the output is:
25 0 33
(the bounds are 0-50, so 51 and 200 are out of range and thus not output).
To achieve the above, first read the list of integers into an array. -
PRG/420 Week 3 Java 3.11 LAB: Mad Lib - Loops
Regular Price: $7.00
Special Price $3.00
PRG/420 Week 3 Java 3.11 LAB: Mad Lib - Loops
Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (and hopefully funny) ways.
Write a program that takes a string and integer as input, and outputs a sentence using those items as below. The program repeats until the input string is quit 0.
Ex: If the input is:
apples 5
shoes 2
quit 0the output is:
Eating 5 apples a day keeps the doctor away.
Eating 2 shoes a day keeps the doctor away.Note: This is a lab from a previous chapter that now requires the use of a loop.
Learn More -
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.00FUNCTIONAL 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 OrderAs 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 55CODE 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 reportFollow assignment specification regarding class/method names.
Learn More
Note that your java filename must match class name (DO NOT rename). -
CIS355A Week 2 Lab - Developing a GUI Application
Regular Price: $12.00
Special Price $10.00
CIS355A Week 2 Lab - Developing a GUI Application
OBJECTIVES
• Create a GUI that uses JTextField, JLabel, and JButton.
• Write event handlers to process user data.PROBLEM: Health Profile App
GymsRUs would like to replace their console program with an updated app using a graphical user interface. You will use the HealthProfile class that you created in the Week 1 Lab and build a GUI for it.FUNCTIONAL REQUIREMENTS
Make sure your HealthProfile class from the Week 1 Lab is in a named package, not default (i.e., package lab1).You must ADD the project that contains the HealthProfile class to this week’s project by
right click project, go to properties; and
click Libraries, Add Project, click OK.Then you will be able to reference your existing class as
import lab1.HealthProfile.Your project will have three classes:
• HealthProfile class from Week 1 Lab
• HealthProfileGUI class
• Lab2Main classYour HealthProfildGUI class should have the following components (see sample GUI below).
• JTextField objects to enter: name, age, height in feet, height in inches, weight in pounds
• JButton objects to display results, clear the GUI
• JTextField objects to display the BMI, category, and max heart rate
• JLabels to describe all textboxes
You are free to layout and design your GUI as you like as long as it includes these components.Add default and parameterized constructors to your HealthProfile class. The parameterized constructor should have five arguments: the name, age, weight, height in feet, and height in inches. Note it should convert the height to inches to store in the private instance variable.
Code event handlers for each button:
• Display: Make sure all user input is present and valid Use the HealthProfile class to process the data Display the results on the GUI
• Clear Clear all text boxes on the GUIGRADING RUBRIC
HealthProfile class
• Add default and parameterized constructors 10
HealthProfileGUI class
• All components on GUI
• Display button event handler coded properly
• Clear button event handler coded properly
• Error messages for any invalid/missing user input using JOptionPane 25
Lab2Main class
• Displays the GUI properly 5
Code style 5
Lab Report 10
TOTAL 55CODE 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 reportFollow assignment specification regarding class/method names.
Learn More
Note that your java file name must match class name (DO NOT rename).