Concept explainers
First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects).
Then create a new Java application called "IncomeTax" (without the quotation marks) that prompts a user for his or her marital status (single or married) and annual income (a double value), and then uses nested if statements to compute that person's tax, based on the simplified tax-rate table below.
Output of your
Based on a status of "single" and an annual income of $10000.00,the income tax is 15.00% of $10000.00, which equals $1500.00.Simplified Tax-Rate Table
Income |
Marital Status - Single |
Marital Status - Married |
---|---|---|
<= $30,000 |
15% |
12% |
> $30,000 |
25% |
20% |
Thoughts
- Note the requirement for this program to use nested if statements. This requirement is intended to help you build some logic with good formatting.
- Use comments to help readers understand your code.
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
- I am looking for the following in your program: Python GUI-based MP3 Player Project #3: Python GUI-based MP3 Player 1. Ability to select a folder / directory for MP3s. (HINT: There’s a function/method in filedialog of tkinter to do this. In other words, you'll need the following import: from tkinter import messagebox, filedialog 2. Ability to play selected MP3s. 3. Ability to pause the current MP3. 4. Quit button/function to exit application. 5. Use a list to store and display the mp3 file names. You will need to demonstrate your mastery of lists, loops, and GUI elements within this program. Submission will include: 1. Python program named myplayer.py 2. Data Flow Diagrams / Pseudocode 3. If choosing an alternate library to tkinter or pygame, provide instructions and download links for the alternate library.arrow_forwardIn java language Class Design – Date V0.0 & V1.0 Create a new project for this lab and create a new class inside called Date. If you created a Date class last week, you may use it as a base. What does it mean to be a Date? What data items (called “state”) do you need to keep track of? Alternatively, what does a date have? (“has a” == composition) What can a Date do? What are the actions and verbs that can be applied to a date? Come up with one or two. These become the class’s methods. Try adding 3 data items to your Date to manage the month, day and year. Should these be local variables? Class-level (or instance) variables? Now let’s build a method to set the date This function should take 3 integers as input and assign these to your instance variables declared in the previous step. public void setDate(int m, int d, int y) { And, let’s build a method to report the date This function takes no input and uses the console to output the Date in the format…arrow_forwardin java but don't write as a GUI (Graphical User Interface) Write a program that reads a file named input.txt and writes a file that contains the same contents, but is named output.txt. The input file will contain more than one line when I test this and so should your output file. Do not use a path name when opening these files. This means the files should be located in the top level folder of the project. This would be the folder that contains the src folder, probably named FileCopy depending on what name you gave the project. Do not use a copy method that is supplied by Java. Your program must read the file line by line and write the file itself. Class should be named FileCopy do not write to input.txt!arrow_forward
- Imagine that you own a flower store and you need to display a menu of all the item categories, items and prices you sell for your customers. Display the prices for each product and category. The flowers are {"Rose", "Carnation", "Tulips", "Sunflowers"}, the price in order are {1.15, 1.5, 2.5, 2.75} the second category is vase sizes, {"Small", "Medium", "Large", "XLarge"}, the prices in order are {1.25, 2.5, 3.75, 4.5}. The last category is add ons, {"Teddy Bear" , "note", "ballon", "choclates"}. The prices are in order {10.0, 2.5, 5.75, 8.75} The list of products and the list of prices should be stores in 2 separate arrays. Create a method "display" that accepts 2 arrays as parameters and displays the product and the prices in receipt form. Create another method "sum" that displays the total for each category.arrow_forwardCreate a simple Java application to manage student information. The application should have a text-based interface. The application should prompt the user for the following information: Full Name, Degree, and Points. The user should be able to continuously enter student data until an exit key is pressed (se the algorithm below). After the student has entered the student data the application should display all student data entered. Algorithm 1 Ask if the user if wants to stop entering data 2 Do the following until the student wants to stop entering data 2.1 Prompt the user to enter data for a new student 2.2 Save the new student data 2.3 Ask if the user wants to stop entering data 2 Show all student data entered 3 Exit program Example input: Text in bold is entered by the user Do you want to continue (y/n) ? y Enter the student's name: John Smith Enter the student's degree: Computer Science Enter the student's points: 125 Do you want to continue (y/n) ? y Enter the student's name:…arrow_forwardIn java plsarrow_forward
- This exercise involves designing a help-desk priority manager. Helprequests are stored in a text file with the following structure: priority, idof requesting party, time of request The priority is an integer in the range1–5 with 1 being the least important and 5 being the most important.The id is a four-digit employee identification number and the time is inTimeSpan.Hours, TimeSpan.Minutes, TimeSpan.Seconds format. Write aWindows application that, during the Form˙Load event, reads five recordsfrom the data file containing help requests, prioritizes the list using a priority queue, and displays the list in a list box. Each time a job is completed,the user can click on the job in the list box to remove it. When all five jobsare completed, the application should automatically read five more datarecords, prioritize them, and display them in the list boxarrow_forwardCan you implement a module named inventory that will be responsible for managing the players inventory? The module should hold the inventory and implement the following functions: - displayInventory: Displays the current inventory - addToInventory: Adds an item to the inventory. *Use existing code below and don't use HTML* const prompt = require("prompt-sync")(); var adventurersName = ["Captain Thomas King","George","Tim","Sarah","Mike","Edward",];var len = 0;var Inventory = new Array(5).fill(" ");Inventory[len++] = "Food";Inventory[len++] = "Wine";Inventory[len++] = "Horses";Inventory[len++] = "Medicine"; var adventurersKilled = 3;var survivors;var numberOfAdventurers = adventurersName.length; survivors = numberOfAdventurers - adventurersKilled; displayIntroduction();getLeader(); var user_life = 3;var correct_answer = ["1","2","3"];var userIsCorrect;var options = ["\nOption 1 Enter the village hut?","Option 2 Eat the turkey leg?","Option 3 Sit on the stool?","Option 4 Talk with the…arrow_forwardFor the following program in phyton : Pay CheckWindow CostWrite an interactive program to calculate the cost of glasswork and metalstripping for rectangular windows. All windows, no matter what size, use thesame quality of glass and aluminum strips. Prompt the user for his/her name,age, length, and width of a window, then calculate the costs shown based on theinformation read in from the windowinfo.txt file which contains the materialstypes and costs (you cannot change this file at all). There is a discount on thetotal cost of 10% if the total area is over 1000 square inches, and 15% if it isover 1500 square inches.*Be sure to include a try/except and any and all string methods you might need*No conditional loops can be used at all**This is the info you will see in the text file, remember you mustread this in and store it:Glass: 80 cents per square inch (unit area)Aluminum: $1.25 per inch (unit length) This is the sample output. Write it to both the screen and a text file…arrow_forward
- IN JAVA PLEASEarrow_forwardIn java Develop a menu-based shape-maker, using randomly generated sizes & characters: pyramid, inverted pyramid, diamond, and hourglass. Use functions to perform tasks, including separate functions for generating a random integer in a range and for generating a random character in a range. The four different shapes are made from a randomly generated printable character and a randomly generated maximum width between 4 and 12. Beneath the shape, print a descriptive caption stating the symbol and the maximum width.Define the random integer and random character functions in a separate class in a separate source code file and call these functions from the shape maker.arrow_forward*with psuedo code First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects). Then create a new Java application called "WeightedAvgDataAnalyzer" (without the quotation marks), that does the following: This program is similar to the previous assignment - "WeightedAvgDropSmallest" - with a major difference that the inputs for the program will be read from a file and the output for this assignment should be written to a new file. The concept of application is as follows: The program will read numbers from a file - data.txt - that you will create, where the weight is a double (greater than 0.0 and less than or equal to 1.0) and the other numbers are the number, n, of lowest values to drop and then the numbers to be averaged after dropping the lowest n values. Example data.txt file would display: 0.5 3 10 70 90 80 20 The program then calculates the weighted average of all those numbers except the lowest n numbers, where…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education