Category: Computer science and IT assignments

Plant vs Zombies game

want a C++ code for a simple plant vs zombies game, in which zombies should move towards the plants and eat them. detailed output is given in the file. every step should display the output given in the file. PLEASE HELP I AM FROM MECH ENGG BACKGROUND I NEED TO PASS THIS MODULE

Tic Tac Toe

This assignment is to create a Tic Tac Toe game in Java. I have attached the assignment outline detailing what is needed to be done in the assignment (index.pdf). The assignment must be done using the given java files in the zip folder (a1_3000000_3000001 (5).zip). There are also Junit files to test the code.

Tic Tac Toe

This assignment is to create a Tic Tac Toe game in Java. I have attached the assignment outline detailing what is needed to be done in the assignment (index.pdf). The assignment must be done using the given java files in the zip folder (a1_3000000_3000001 (5).zip). There are also Junit files to test the code.

Tic Tac Toe

This assignment is to create a Tic Tac Toe game in Java. I have attached the assignment outline detailing what is needed to be done in the assignment (index.pdf). The assignment must be done using the given java files in the zip folder (a1_3000000_3000001 (5).zip). There are also Junit files to test the code.

Tic Tac Toe

This assignment is to create a Tic Tac Toe game in Java. I have attached the assignment outline detailing what is needed to be done in the assignment (index.pdf). The assignment must be done using the given java files in the zip folder (a1_3000000_3000001 (5).zip). There are also Junit files to test the code.

Programming Exercise 15

Create a class called GermanToEnglishDictionary and a HashMap from String to String in that class called content. You will need to import java.util.HashMap. Create a no-args constructor that creates the content eld as an empty map.
Create an enumerated type (enum) called Coin that can take the values ONE PENNY, TWO PENCE, FIVE PENCE, TEN PENCE, TWENTY PENCE, FIFTY PENCE, ONE POUND and TWO POUNDS.

loan calculater

Loan Calculator
You’ve been hired to do some programming for Metro Bank. They want you to create a program to calculate loan payments. The user will enter the amount of money to borrow from the bank, the annual percentage rate (that will be compounded monthly) and the number of years to pay back the loan. The program will then display the monthly payment and the total amount of interest that will be paid. Also, to be more helpful to the user, display these same results using a loan amount of 10% more and 10% less.
Objectives
writing your own functions with parameters and return values
gaining more experience working with calculations
User Interface
INPUT
After displaying a user introduction, the program asks for:
the amount of loan in dollars,
the length of loan (in years), and
the annual percentage rate.
For the percentage rate, the user enters a percentage value. For example, if the percentage rate is 5%, the user should enter 5, not the decimal 0.05. Programs should not make the user do the math.
Make sure that the prompt clearly tells the user what to input and the units for each input. 

OUTPUT
The program must first redisplay the original input. Then,
display the monthly payment and the total interest (see formulas below).
display monthly payment and total interest using a loan amount of +10% and -10% to give the user a range of results.
All dollar amounts must be displayed with exactly 2 decimal spaces. All displayed values need to be properly labeled.
Formulas and Code Specifications
Periodic Payment
Let:
A = amount of the loan
r = interest rate per month as a decimal, not percentage
n = the number of months

Then the formula to find the monthly payment is:
payment.gif

Total Interest Paid
Let:
P = the monthly payment
n = the number of months
A = amount of the loan

Then the formula to find the total interest is:

Total Interest = nP – A

Functions:
For this program, you will write a function to calculte each of the formulas above. Remember that once you have written a function you need to call it to get it to execute.
Write a function defintion that is passed in the amount of the loan, the number of periods, and the interest rate per period (as a decimal) and returns the monthly payment.

Notice that the units of the parameters are the same as the units in the formula. However, these are different from the units input by the user. So you’re program will need to do some unit conversions before calling the function.

Write a function definition that is passed in the monthly payment, the number of periods, and the amount of the original loan and returns the total interest paid. Again, be mindful of units.

Also, be aware that since you are formatting the monthly payment to 2 decimal places, that must also be the value used to calculate total interest. Otherwise, you’ll have a rounding error.

Since the program needs to output 3 sets of results (results for the user input loan, as well as + 10% of loan amount and -10% of loan amount)  put the code to display the output nicely into one function and call it for each set of data.
This means your program will have a minimum of 4 function definitions:  main(), the 2 calculation functions, and a display function.
How to Get Started
The first step I recommend is to implement the periodic payment function and test it, similar to lab 3. Reread the description, identify the parameters and the return, then work on the calculation. Once you have written the function, test it by calling the function and displaying the results. Perform some calculations by hand to confirm that the function works properly.

Next, implement and test the other calculation function.
Here are some test data to use for testing your functions. Remember to make sure you are using the correct units. For example, a loan length of 3 years does not mean to pass in a 3 to the periodic payment function. How many monthly payments are there in 3 years? That’s the number to pass in. You’ll have to do a similar conversion on the interest rate: annual percentage rate is not the same as periodic decimal rate.

loan amount = $5000
loan length in years = 3
annual rate = 12%

monthly payment = $166.07
total interest = $978.52 
loan amount = $1500
loan length in years = .25 (3 month loan)
annual rate = 12%

monthly payment = $ 510.03
total interest = $ 30.09
Once you have gotten these functions to work, then focus on the main() function to complete the user input and the final display.

Documentation & Style Specifications
Refer to the Comment Descriptions and Documentation Standards page in Canvas.
Include header comments at the top of the file listing that has your name, date, and a description of the program (remember, this is different than a user introduction). The description should be 2  or more lines long describing what the program does.
Include block comments for each function definition, except main(), to describe what it does.  These block comments go directly above the function defintion.
make sure to describe parameters and return values. Follow the style you see in the posted examples.
Include blank lines to separate function defintions and blocks of code.
Use descriptive variable names.
Use named global constants for the increase/decrease in loan value.
Use comments elsewhere that you think would help guide the reader. You don’t want to overdo it though. Not every line of code needs a comment. Think in terms of blocks, or if a calculation is not clear.
Assume the reader has not read the homework assignment.
Assume the reader knows Python.

building a unix shell

This assignment asks you to build simple Unix shell and gives you in the process an opportunity to
demonstrate that you are mastering concurrency (including running external executables) and file
manipulation using the POSIX API. You may have seen similar assignments in other courses but
they are similar and not identical; make sure you follow the specifications herein, not something
else.
Our shell repeatedly provides a prompt, accepts a command (possibly with arguments), and
executes it. Most commands are external executables, but some are internal.
The shell ignores completely its environment and reads a simple configuration file upon
startup instead. The file is named shconfig and resides in the current directory. It contains pairs
consisting in a variable name and a value for that variable, separated by at least one blank. The
two interesting lines in this file have the form
VSIZE v
HSIZE h
where v and h are strings representing positive integers. These variables are used by the internal command more. If these lines do not exist (or if the file is missing altogether), two such lines
must be appended to the configuration file (which must be created first if not already there) with
the values 40 for v and 75 for h. The configuration file may contain other lines, which should be
ignored.
The following functionality should then be implemented:
All the typed in commands should be considered external except the commands more and
exit. Your shell should attempt to execute these commands. The search path for the external
commands contains only the directories /bin and /usr/bin (so any command outside these
directories should be ignored unless it is given by absolute path). If the command cannot
be found, then the shell should print an appropriate message; if the command produces an
error during its execution, then the shell should print yet another appropriate message (in
addition to whatever is printed by the command itself).
The arguments for the commands are provided in the same manner as in normal shells.
A command may be prefixed by the character & followed by a blank. If this is the case, then the
command is executed in the background, in the sense that the shell presents the prompt (and
accepts another command) before the completion of the previous command. Whenever the
background command terminates (with or without errors) the shell must print an appropriate
message, again in addition to whatever is printed by the command.
1
The command more must be implemented internally. This command receives one file name
as argument, and displays it to the standard output page by page. The number of columns
in a page and the number of characters in a column are taken from the configuration file and
are given by the value v of variable VSIZE and by the value h of variable HSIZE, respectively1
.
The command more displays v lines of the file given as argument and then awaits user input.
If the input is the character blank, then the next v lines are displayed; if the input is anything
else, then the command terminates. The command also terminates when it reaches the end
of the file. All the lines are displayed truncated to h characters if necessary (i.e., if they are
longer than h characters).
The command exit terminates the shell.
What to submit For this assignment you must use the POSIX interface presented in class for file
access rather than library functions.
The default target of your makefile must produces an executable named sshell and residing
in the root directory of your submission

Classes and Privacy DIY

This is only for DIY part of the given Workshop 3. Update the Train module to provide a stronger sense of encapsulation while also creating additional functions. As you work on the DIY, it is recommended to look over the provided main program to gain hints on how to implement the requirements. More detailed and proper instructions are provided in the attached PDF file.

RUBy Reinforcement assignment

answer Chapter 2-1 questions  1-5 on page 74
be sure to add comments to show where you answered question on the document

There might be some error in my document because ive started it. If you look at chapter 2 in the book it walk you threw how the game is suppose to look. For some reason mine had trpuble running. save as rb. file