Category: Computer science and IT assignments

Core Scheduling UNIX

I need to be able to run it in UBUNTU or some other LINUX OS environment. There are five files attached. one is the assignment. one is what should be the output. one is the input. It should be able to work for other input files, this one is just a sample though. one file is a possible solution using arrays. one file contains notes I took. One file contains a PPT with information on how the assignment is supposed to be done.

c or c++ is required. other programming languages can’t be used

Inheritance Starter (Java Assignment)

I have done most of this already. Just need some things looked over and cleaned up. In the Table.java class according to the Javadoc a setter and getter method need to be added in, and in the FurnitureProduct class there is magic number on line 85 that needs to be done in a different way, and also line 53 has a hidden field issue that needs resolved.  As far as I know this is all that needs looked at, if I’m wrong let me know. 

I know that my price is probably too low, but like I said I just need it looked over, and the coding issues I mentioned fixed.  So hopefully someone will be willing to help me out here.

Mars

It is the year 2030, the MarsX Space Vehicles Company is in the process of designing its X-2 single use Space Transportation Systems (STS).  You have been tasked with creating a class to model a single STS.

Design a class named STS (Space Transportation System) that contains:
1.    A private int data field named STSId for the STS registration ID.
2.    A private Date data field named dateCreated that stores the date when the STS was created.
3.    A private double data field named emptyMass in pounds (default to 613,100) which represents the mass of the STS before fueling.
4.    A private double data field named fuelMass in pounds (default to 3,785,000) which represents the mass of the fuel needed by the STS.
5.    A private double data field named payloadMass in pounds (default to 0) which represents the mass of the STS payload.
6.    A private double data field named totalMass which represents the mass of the STS after it has been assembled in the launchpad fully fueled (emptyMass + fuelMass + payloadMass).
7.    A private String data field named manufacturer that stores the name of the company that built the STS (default MarsX). Assume all STSs have the same manufacturer.
8.    A private int data field flightTime in seconds (default to 0).
9.    A no-arg constructor that creates a default STS and initializes the STSId with a 5 digit random integer and the date when the STS was created.
10.    A two-argument constructor that creates an STS with a specific initial fuel mass and payload mass (constructor arguments) and also initializes the STSId with a 5 digit random integer and the date when the STS was created.
11.    The accessor (get) and mutator (set) methods for manufacturer, fuelMass and payloadMass
12.    The accessor (no mutator) methods for flightTime, emptyMass, totalMass, STSId and dateCreated.
13.    A method named increseFlightTime() that increases the flight time by 5 seconds. The STS burns through 1% of its fuel for every second of flight (up to the original fuelMass).
14.    A method named deployPayload() that deploys the payload in space (mass will be affected). The STS takes 200 seconds to get to space. It cannot deploy its payload before that. Show error message if this method is called before the STS gets to space.
*Provide appropriate input validation for these methods. Print a message to the console if the arguments passed to the method do not pass the validation test(s).

Write a test program (class TestSTS) that creates an STS object and tests every method of the class. (use console output).

Computer science coding project

To make a multiple quiz game (with buttons). This game contains logins for students so student id and password required. The students results from the quiz are put into a leaderboard where the teacher using a teacher login can view the students doing well. It needs to be a level standard so to include databases to store the results etc. Dont worry about the actual questions Ill put them
In so jus put in like one question to test it. Thanks

Software Trojan

material link – https://drive.google.com/open?id=1D10LzXrnt8om97HjmJbmgepJFrghe6Rm

above given link contain all required file for completion of assignment.
my assignment is I need to work on software Trojan,  my teacher is provided me code already, i need to modify the code and need to compare performance of code without modification and with modification.

problem statement ->if a given instance particular processor  access a memory block then memory block status is marked in shared list –
three situation may arise – memory block may be marked in sharer list as owned,modified,invalidate
during execution number of processor access the memory block and according to that in shared list memory block status change
if at particular instance a processor p1 access block m1, and modified it so status of block should change in shared list ,but i need to insert Trojan in this code, means need to modify the code so changed status of block should not showed in shared list
and calculate the performance of the code with modification and without modification

simulator installation command – cd multi2sim-4.1
./configure
make
sudo make install

after installation for running code – use m2s –x86-sim detailed –x86-config ../x86-config-16.ini –mem-config ../mem-config-16.ini –x86-report report-n-16.txt –mem-report mem-report-n-16.txt fft -p 16 &> stdout-n-16.txt

Queue system for ticket purchasing (QueueingSimulation problem) in FreeMat

Create a simulation system for ticket purchasing for movie, football, concerts and etc. The
simulation system should be able to simulate the arrival of the customers and evaluate the results
of the simulation. Assume that there are different types of tickets for sales. Firstly, create and
display the tickets information table, the table of the service time, inter-arrival time, ticket slot/day
and ticket type, with an example given below(Picture1&2).

Before the simulation starts, set the counters that are in operation and counters that are not in
operation. During the simulation, more counters should be opened if there is a need (Set the
conditions for this). Besides, you can create a special counter that exclusively for member only
and so on. Assume that the customers queue up in a line and will proceed to any counter(s)
that are free to serve the customers. End the simulation when all the customers have arrived or
all the tickets are sold off.
For generation of random numbers for the service time, inter-arrival time and ticket type and etc,
you can consider linear congruential generators and other generators. User should be able to choose
the type of random number generator to be used before the simulation. Adjust the range of random
numbers so that they are within the appropriate range. Exhibit the message for the counter
operating status, arrival, departure of the customers and so on from time to time. For example:
Counter 1 and Counter 3 are in operation.
Arrival of first customer at minute 0 and 5 tickets were purchased.
Arrival of second customer at minute 2 and 2 tickets were purchased.
Departure of the first customer at minute 4.
Service for second customer started at minute 2.
Counter 2 started operation at minute 3.
Ticket type 1 is selling fast.

At the end of the simulation, display the results of the simulation such as the following:(Picture3&4)

At the end, evaluate the results of the simulation, such as (not limited to) average waiting time of
a customer, average inter-arrival time, average arrival time, average time spent, probability that a
customer has to wait in the queue, average service time for each counter and sales per counter.

Movie Listing

The intent of this program is to manage a set of favorite movies. Each movie will have data associated with it:

Title
Year produced
Rating (this can be a simple 1-5 integer) that represents how much the user likes the movie.
Anything else youd like to add to make yours unique (can result in extra credit)
You must allow the customer to do the following actions on the movie list:

List all movies
Add Movie
Delete Movie
Edit Movie
Exit program
The menu prompted to the user should look something like the following. You can also allow the user to input only the first letter of each word, but you need to make it clear whats happening.

COMMAND MENU

(L)ist List all movies
(A)dd Add a movie to the list
(E)dit Edit a movie on the list
(D)elete Delete a movie on the list
(Q)uit Exit the program

I can now as the user enter either the word, or the letter (capitalized and in parentheses). If I enter anything else besided the letter or words on the menu the input is invalid and I have to try again.

For example, my implementation looks like this when I enter l for list movies:

COMMAND MENU

(L)ist – List all movies
(A)dd –  Add a movie
(E)dit – Edit a movie
(D)el –  Delete a movie
(Q)uit – Exit program

Command: l

1.Monty Python and the Holy Grail (1975) – Rating: 5
2. On the Waterfront (1954) – Rating: 2
3. Cat on a Hot Tin Roof (1958) – Rating: 4
Once I enter the main command, I will be prompted through the process of adding/editing/deleting/listing. For example, if I want to edit a movie, Ill be prompted for the number of the movie I want to edit, and then prompted for all the values to enter (similar to adding a move).

For example, here Im editing the second movie:

Command: e
Please input a number between 1 and 3: 2
Movie number 2 named ‘On the Waterfront’ will be changed. Are you sure (y/n)? y
    New Name: The Matrix
    New Year: 1999
    New Rating (number between 1 & 5): 5
Movie number 2 – named ‘The Matrix’ was changed.

Deleting a movie:

Command: d
Please input a number between 1 and 3: 3
Movie number 3 named ‘Cat on a Hot Tin Roof’ will be deleted. Are you sure (y/n)? y
Cat on a Hot Tin Roof was deleted.

Adding a movie:

Command: a
    Name: Star Wars
    Year: 1977
    Rating (number between 1 & 5): 4
Movie number 3 – named ‘Star Wars’ was added.

CS

Program Assignment
Use printf to ensure dollar values are rounded to two decimal places.
Investments (180 total)

The following program models an Investment Protfolio.  Please follow the model as described.
There are many different kinds of investments, including stocks, bonds, and bank accounts. There are two kinds of bank accounts: checking and savings. Design subclasses: Stock, Bond, and BankAccount, and its two subclasses SavingsAccount and CheckingAccount.

Investment (10)
Design an abstract Investment class that includes String type and String name attributes, and a  double investmentValue attribute. Each has an accessor and mutator method. There is also a toString method to print out the type and the name.
There is a default constructor that sets the type and name to none. 
There is also a two parameter constructor with the type and name. The Investment class, being abstract, cannot be instantiated.
There is also a toString method to print out the type and the name.

Stock (20)
The attributes of Stocks are pricePerShare, numOfSharesOwned, and dividendsEarnedToDate (a percent of the investment paid annually), as well as the inherited attributes.  These pricePerShare and numOfSharesOwned have accessors and mutators.
There is a default constructor that calls the super default constructor.
There is a constructor with name (of the stock), pricePerShare and numSharesOwned.
Calls super, hardcoding Stock for the type.
Calls mutators for the pricePerShare and numSharesOwned parameters.
Calls setInvestmentValue with the initial value of the investment as calculated from the other two parameters.
There is also a method calcStockValues with parameters of type double priceChange and dividendPercent. (Note: Based on stock is called periodically)
The pricePerShare increases or decreases by the priceChange (which could be positive or negative.
The currentDividend is calculated by the pricePerShare*dividendPercent/100.0
Increment the dividendsEarnedToDate as appropriate
If there was a profit indicated in this call use the dividend to buy additional shares and update the numOfSharesOwned.
Calculates the new total value of the investment and calls setInvestmentValue to set the value (It is simple to calculate new totalValue).
There is a toString method that uses super.toString to help print out the stock data in accord with the portfolioresults.txt file (found in the homework).

Bond (20)
The attributes of Bond are double pricePerBond, annualReturnPercentage, rate, cashEarnedToDate, and int numBondsOwned, as well as the inherited attributes. There are accessors and mutators for pricePerBond, numBondsOwned, and annualReturnPercentage.  The setAnnualReturnPercentage method also calculates the monthly rate of return (divide by 12. And 100.)
There is a default constructor that calls the super default constructor.
There is a constructor with name (of the bond), pricePerBond, numBondsOwned, and annualReturnPercentage.
Calls super, hardcoding Bond for the type.
Calls mutators for the pricePerBond, numSharesOwned and annualReturnPercentage parameters.
Calculates the new total value of the investment and calls setInvestmentValue to set the value (It is simple to calculate new totalValue)
There is a method calcBondValues with no parameters that assumes that it is being called on a monthly basis (for simplicity)
Calculates cashEarnedToDate by adding to the current cashEarnedToDate the value of one months worth of interest based on pricePerBond
Call setInvestmentValue as pricePerBond*numBondsOwned + cashEarnedToDate. (Note we arent reinvesting here like we did for Stock)
There is a toString method that uses super.toString to help print out the bond data in accord with the portfolioresults.txt file (found in the homework)

BankAccount (20)
BankAccount is an abstract class that extends Investment.  The name field holds the banks name. An additional String attribute accountNumber represents an account number. It also has the inherited attributes. This attribute has a mutator and an accessor. BankAccount has two subclasses: SavingsAccount and CheckingAccount.
There is a default constructor that calls the super default constructor. It also uses a mutator to set the  accountNumber to none.
There is a constructor with type, name and accountNumber.
Calls super with type and name
Call mutator to set the accountNumber.
There is a toString method that uses super.toString to help print out the BankAccount data (for the appropriate subclass in accord with the portfolioresults.txt file (found in the homework).

SavingsAccount (20)
A SavingsAccount is a sublass of a BankAccount. SavingsAccount has annualInterestRatePercent, rate(the prior value divided by 12 and by 100) and totalInterestEarned as instance variables as type double, as well as the inherited instance variables. Both annualInterestRatePercent and totalInterestEarned have accessors and mutators. The setAnnualInterestRatePercent method also calculates the rate of return (divide by100.0)
There is a default constructor that calls the super default constructor.
There is a constructor with name and accountNumber, the initialDeposit, and the annualInterestRatePercent.
Call super with “SavingsAccount”, bankName, and accountNumber.
Call setInvestmentValue to the initialDeposit.
Call setAnnualInterestRatePercent with the annualInterestRatePercent.
There is a method makeDeposit with a double deposit input parameter that uses setInvestmentValue to update the amount in the account.
There is a method makeWithdrawal with a double withdrawal input parameter that checks if there are sufficient funds to withdraw. If there arent dont make a withdrawal but print a message stating insufficient funds. Otherwise uses setInvestmentValue to update the amount in the account.  This method returns true if withdrawal is made, otherwise false
There is a method calcValue with no parameters which calculates the interest for the month (assume a monthly interest payment so divide rate by 12).
Then add to totalInterestEarned the interest calculated
Call setInvestmentValue which adds the interest the investmentValue (so that interest is collected on the entire amount).
There is a toString method that uses super.toString to help print out the SavingsAccount data (for the appropriate subclass in accord with the portfolioresults.txt file (found in the homework).

CheckingAccount (20)
A CheckingAccount is a subclass of a BankAccount with a minimum balance for free checking, and an annual interest rate (paid monthly) on all the money if the minimum balance is met, and a charge per check if the minimum balance isnt met.
CheckingAccount includes type double instance variables annualInterestRatePercentage, rate, totalInterestEarned, minimumCheckFreeBalance, checkCharge and totalCheckCharges, as well as the inherited instance variables. Each of annualInterestRatePercentage,  totalInterestEarned, minimumCheckFreeBalance, checkCharge and totalCheckCharges have accessors and mutators. The setAnnualInterestRatePercent method also calculates the associated rate of return (divide 100.0)
There is a default constructor that calls the super default constructor.
There is a constructor with name and accountNumber, and the  initialDeposit, annualInterestRatePercentage, minimumCheckFreeBalance and checkCharge.
Call super with “CheckingAccount”, bankName, accountNumber.
Call setInvestmentValue to the initialDeposit.
Call setMinimumCheckFreeBalance.
Call setCheckCharge.
There is a method makeDeposit with a double deposit input parameter that uses setInvestmentValue to update the amount in the account.
There is a method writeCheck with a double checkValue
If there is not enough in the account to cover the check, print a message to the terminal indicating insufficient funds and return false.
If the investmentValue >= the minimumCheckFreeBalance
Update the investment value by deducting the check value
          else
        Update the investment value by deducting the check value and the check charge
        Update totalCheckCharges
          Return true
There is a method calcValue with no parameters (we are assuming a monthly update)
If the investmentValue >= minimumCheckFreeBalance
Calculate this months interest based on a monthly rate (divide rate by 12).
Adds interest to the totalInterestEarned
Updates the investmentValue
There is a toString method that uses super.toString to help print out the SavingsAccount data (for the appropriate subclass in accord with the portfolioresults.txt file (found in the homework).

Portfolio (60)
There is a class Portfolio that has three purposes, initializing, managing and reporting on the portfolio. You will need to import a number of classes, and use throws IOException in several headers.  You dont need to implement try and catch unless you wish to.
The instance variables are
private String portfolioName;
private ArrayList<Investment> portfolioInvestments = new ArrayList<Investment>();
private Random randy;
public Scanner keyboard = new Scanner(System.in);
There is a default constructor that sets the portfolioName to none
There is a constructor with a portfolio name and a seed.
The constructor sets the portfolio name
The constructor creates Random object using the input seed.
There is a method initializePortfolio with no parameters
Asks for the name of an input file ( see my file portfolio.txt for format to read in the investments.) You can use this file for testing.
Create a Scanner to read from this file
Reads in investments from the file (check to make sure the file exists) ne at a time, first determining the type and then reading in the rest of the values. Create the object and place in portfolioInvestments ArrayList.
When done with the file close the Scanner associated with it.
There is a modelPortfolio method with a single input with the number of months to model.
For each month
    For each investment in the portfolioInvestments ArrayList
        If a Stock
            Every three months (quarterly)
Randomly generate a type double price change of between -10% and +20% (Use global randy)
Randomly generate a type double dividendPercent between 0 and 5% (Use global randy)
Call calcStockValues for this Stock with appropriate parameters
ElseIf a Bond
Call calcBondValues() for this Bond
ElseIf a SavingsAccount
    Do 3 times (3 transactions per month)
Generate a deposit or withdrawal between -$600.00 and $1000.00 (Use global randy)
If deposit (positive number)
Call makeDeposit for this SavingsAccount with appropriate parameter
If withdrawal (positive number)
Call makeWithdrawal for this SavingsAccount with appropriate parameter
Call calcValue for this SavingsAccount
ElseIf a CheckingAccount
Generate a deposit between $500.00 and $1500.00 (Use global randy)
Call makeDeposit for this CheckingAccount with appropriate parameter
    Do 4 times per month (writing 4 checks)
        Generate a check between $10.00 and $300.00 (Use global randy)
Call writeCheck for this CheckingAccount with appropriate parameter
Call calcValue for this SavingsAccount (This done once at end of month to calculate interest, if any)
There is a method called generatePortfolioReport with an int months as a parameter
Ask for the name of an output file
Create a PrintWriter that writes to that file
Note look at my portfolioresults.txt file for a formatting suggestion
Print the header
For each investment
Print out its information using toString
Print out the total value of the portfolio
Close the PrintWriter

TestPortfolioManager (10)
This class contains the main method.
Create a Scanner to read in data from the terminal

Request and read in the name of the portfolio.
Request and read n a seed.
Create a Portfolio object with the portfolio name and seed.
Call initializePortfolio for the Portfolio object.
Request and read in the number of months to model.
Call modelPortfolio for the Portfolio object with the number of months.
Call generatePortfolioReport for the Portfolio object with the number of months.

Sample interactive part
Please enter the name of the portfolio: Computer Student
Please enter a seed to use to create a Random object in the portfolio: 2
Please enter name of file to read the portfolio from: portfolioinput.txt
Please enter the duration in months to model this portfolio: 60
Please enter name of file to write portfolio results to: portfolioresults.txt

Making a Table and a Word Guessing Game with Python

http://www.cs.bc.edu/~straubin/csci1101-2020/Week4/Assignment4.html

The assignment instructions are above. I need to solve the assignment with nested for loops. This is what we have learned for this unit, and what we are expected to use in our code:
http://www.cs.bc.edu/~straubin/csci1101-2020/Week4/Lecture4.html

We are able to use everything we know up to lecture 4:
http://www.cs.bc.edu/~straubin/csci1101-2020/syllabus.html

I have spent 8 hours on this assignment and am struggling to no end. Loops are baffling to me.

Additional materials attached include:
– The windchill function
– The guessword.py file
– The worldlist100.txt file
– Instructions on where and how to download python 3.8

Projectile motion

Once dropped from a plane, a package is described by a system of nonlinear differential equations. The task is to find the location where it should be dropped from the plane, which travels at a constant velocity, so that it lands at a fixed location. The solution should include the steps showing the analytical solution of the derivation of the system of equations.