Expense

Expense 1

Develop a python program that reads the information of credit card transactions from a file and calculates the total amount of payments made. Then, adds the following sentence to the end of that file:
Total amount spent: $total calculated amount. For example:
“Total amount spent: $2398.78.The format of the file is as follows:
date, company, amount
12/6/2020 , Apple , MacBook Air, $1200.54
20/6/2020, Best Buy, Optical Mouse, $45.37

PointerArray

PointerArray 2

Write a program that does the following using pointers: -asks the user for a number of elements that should be generated. Let’s call this number n (n >0 and n<100) -allocates space for n of integers -generates n random integers (0-1000) and store in the allocated space -prints out the number of stored elements that are divisible by 5 -deallocates the memoryThe sample run may look like the following> enter the number of elements> 10> No of elements divisible by 5 is 3

NumberToWords

NumberToWords 3

ITSE 2321 – OBJECT-ORIENTED PROGRAMMING (JAVA)
Program 11 – Strings
One common security method in check-writing requires that the amount be written in
numbers and spelled out in words as well. Even if someone is able to alter the
numerical amount of the check, it’s extremely difficult to change the amount in words.
Write a program that receives a numeric check amount, that is less than $1000.00, from
the user and writes the word equivalent of the amount.
For example, the amount 112.43 should be written as:
One Hundred Twelve and 43/100 dollars
Do not accept invalid amounts.
Allow the user to run the program as many times as possible until a sentinel value of
zero (0) has been entered for the check amount.
Run your program with the following data and copy and paste the output to a file:
112.43
1000.00
0.23
550.301
2.10
25.50
0
No input, processing, or output should happen in the main method. All work
should be delegated to other non-static methods. Include the recommended
minimum documentation for each method. See the program one template for more
details.
Every method in your program should be limited to performing a single, welldefined task, and the name of the method should express that task effectively.
Create a folder named, fullname_program11. Copy your source code and the output
file to the folder. Zip the folder and upload it to Blackboard.
You will not get credit if the program is not written or does not work as expected.

CylinderVolume

CylinderVolume 4

Write a program that calculates the volume of a cylinder. Your program should ask the user to enter the radius and the height of the cylinder. Your program will use the formula π x r2 x h where π = 3.14159, r = the radius of the cylinder and h = the height of the cylinder. Your program should include an input function, a processing function and an output function in addition to your main function. Do not forget to include the unit of measurement you are using in the output function. Format the response to the hundredth position. Provide meaningful comments in your code to let other coders know what your intentions are for each function.

Rainfall

Rainfall 5

Write a program that stores the total amount of rain for each month in an array. Prompt the user for the values for each month to load the array. Display this information back to them in a nice format with the name of the month and the rainfall for that month. Display back the total rainfall for the year, the average monthly rainfall, the month with the most rain, the month with the least rain, the months with rainfall above average, and the months with rainfall below average. Do not accept negative numbers from the user to be stored in the array.Be sure to test your code with different values and to comment your code completely. Make sure your code is user friendly and the output is formatted nicely.HINT: Break this problem up into pieces. For instance, load the array and display it back out. Get this to work first. Then add the functionality to display the total amount of rain. When that works add the next piece, and so on.Note that this project must be done individually. The program will be checked using a code plagiarism tool against other solutions, so please ensure that all work submitted is your own.You may read and write from the console window.You are to submit your source file, called Rainfall.java in Moodle by the due date.

HollowPlusSign

HollowPlusSign 6

Write a program that prints a hollow plus sign. Ask the user what size plus sign he/she wants and print it out. Name your program Unit9Assignment.Example 1:This program prints a hollow plus sign.
What size plus sign would you like? 6Here is your plus sign of size 6:* *
* *
* * * * * *
* * * * * *
* *
* *
Example 2:This program prints a hollow plus sign.
What size plus sign would you like? 9Here is your plus sign of size 9:* * *
* *
* *
* * * * * * * *
* *
* * * * * * * *
* *
* *
* * *
Example 3:This program prints a hollow plus sign.
What size plus sign would you like? 15Here is your plus sign of size 15:* * * * *
* *
* *
* *
* *
* * * * * * * * * * * *
* *
* *
* *
* * * * * * * * * * * *
* *
* *
* *
* *
* * * * *
Example 4:This program prints a hollow plus sign.
What size plus sign would you like? 0
The size must be positive and divisible by 3.
What size plus sign would you like? 1
The size must be positive and divisible by 3.
What size plus sign would you like? -3
The size must be positive and divisible by 3.
What size plus sign would you like? 3Here is your plus sign of size 3:*
* * *
*
Hint #1: the mod operator (%) can be used to determine if a number is ***** by 3.Hint #2: there is a lot of duplicate work in printing the various parts of the plus sign. Writing methods will save you a lot of coding and make your program simpler.

Aviation Alphabet

Aviation Alphabet 7

Write a program that prompts the user for a word, and displays the word in the Aviation Alphabet:

A = alpha H = hotel O = oscar V = victor
B = bravo I = india P = papa W = whiskey
C = charlie J = juliet Q = quebec X = x-ray
D = delta K = kilo R = romeo Y = yankee
E = echo L= lima S = sierra Z = zulu
F = foxtrot M = mike T = tango
G = golf N = november U = uniform

For example, the string: “Program” should be displayed as:
papa romeo oscar golf romeo alpha mike.

Your program should include a function that uses a switch to display the Aviation Alphabet equivalent of each character (whether upper OR lower case).

Quiz JAVA

Quiz JAVA 8

You are asked to create a program that will be used to create quizzes and test users based on these quizzes.
1. Prompt a secret word and proceed if it matches a secret code.
2. Your program should have two modules: quiz creation mode and test mode. User will be prompted in the beginning to choose from these two modes. For example:“Welcome to the quiz master: please enter 1 if you want to manage questions, 2 if you want to take a quiz, 3 if you want to exit”If wrong number/option entered show the message and ask again.3. If user chose to enter quiz creation module
a. Application then asks user 1) to add new question, 2) to delete existing question, 3) to list all available questions 4) to go to the main module selection menu.
We do not need to have edit capability, this can be done by deleting and adding it back.
b. If user wants to add a new question.
i. Prompt the following information
1. Question Code.
2. Question text.
3. Number of possible answers
a. Loop as many times as there should be answers and prompt to enter answer text
4. Correct answer
ii. IN PHASE 1 NO NEED TO SAVE THIS
iii. Once a new question entered show the “manage questions“ menu
c. If user wants to delete a question, prompt the user to enter Question Code.
i. Show the message that question is deleted
d. If user wants to list all questions then
i. Show the message “Printing questions”
ii. show “manage questions“ menu
4. If user choses to enter quiz taking module
a. Prompt to enter test taker information
i. First Name
ii. Last Name
iii. Number of questions
b. Show message “Starting quiz”c. Show main menu

Pattern JAVA

Pattern JAVA 9

Create a class named Problem1, the program would do the following: – The program should have a main method, for now just leave it empty. Create a method named boxWithMinorDiagonal which takes one integer n as parameter, and doesn’t return any value, the method should print an n-by-n empty box of asterisks with the minor diagonal of’+’ symbols. e.g, when n = 9 the method would display: * * * * * * * ** * * * * + * * * * * * * * * * + * ******** * Create a method named right Triangle which takes one integer n as parameter, and doesn’t return any value, the method should print right triangle of asterisks. e.g, when n = 9 the method would display: * * * * * * * * * * * * * * * * * * * ** * ** * * Create a method named printNLetter which takes one integer n as parameter, and doesn’t return any value, the method should print an n-by-n letter N of asterisks. e.g, when n = 9 the method would display: * * * * * * * * * * * * * * * * * * * * * * * * * * * Create a method named fancy Square which takes one integer nas parameter, and doesn’t return any value, the method should print an n-by-n shape shown below. e.g, when n = 9 the method would display: @******* *+ +* * + + * * + + * * @ * * + + * * + + * *+ +* @******* – Create a method named plusInSquare which takes one integer n as parameter, and doesn’t return any value, the method should print an n-by-n shape shown below. e.g, when n = 9 the method would display: XXXXXXXXX X…+…x X…+…x X…+…X X+++++++X X…+…X X…+…x X…+…X XXXXXXXXX Go back to the main method and prompt the user to enter an integer n. The value of n must be an odd integer and greater than or equal 5. Call the methods created above and pass the integer n as an argument to those methods. Your methods should work for any integer n, so DO NOT hard code the print statements. – Copy the output to a text file named Problem1.txt

NamesList

NamesList 10

Write a program that asks for the user’s name, phone number, and address. The program then saves all information in a data file (each information in one line) named list.txt. Finally, the program reads the information from the file and displays it on the screen in the following format:Name: User’s Name
Phone Number: User’s Phone Number
Address: User’s Street Address
User’s City, State, and Zip Code

×
New Download