Category: Computer science and IT assignments

shuffle java

PeopleShuffleSort.java – Create a program that takes four to eight one-word Strings as a command line arguments, creates/initializes an array of those strings stored in reverse and displays them, shuffles and displays the values, and then sorts the array and displays them alphabetically.
Use the args.length() method to make sure there are at least four command line arguments, but no more than eight. You can also use it to figure out how big to make the array…

Terminal output should look something like this…
java-introcs PeopleShuffleSort Peter Paul Mary Joe Jane
Initializing…
Jane Joe Mary Paul Peter
Shuffling…
Paul Jane Mary Joe Peter
Sorting…
Jane Joe Mary Paul Peter

You will use at least THREE loops, each of which goes through the whole array:
Initialize each of the values of the array to it’s REVERSE input position
Shuffle each of the values in the array to a RANDOM position
Sort each value in the array to it’s English ALPHABETIC position
Run the test no less than three times, each with several different values, and then copy the output from ALL sessions from the Terminal window to a PeopleShuffleSortOutput.txt file.
You are handing in:
PeopleShuffleSort.java (NOT the CLASS file)
PeopleShuffleSortOutput.txt
Tips:

-Please submit as individual files. Don’t ZIP them.
-Update your header information for the Java files, and ADD header info in your -OUTPUT files so I know whose is whose!
-Add your own comments to the code, explaining what you’ve done
-Collaboration is fine, but HAND IN YOUR OWN WORK.
-Test! If it doesn’t work, I can’t grade it properly.

Java Market Receipts project

The solution of the problem includes modeling and realization of the process of issuing
cash receipts in the store. It is necessary to create classes that store and
manipulate information about: store; cashier in a store; goods in a store; cash register in a store;
a receipt that is issued to the customer.
1. Cashier class – stores information about the identification number and name of the cashier;
2. Class Goods to be sold in a store – stores identification number, name,
unit price of the goods and expiration date;
3. Class Cashier in a store – stores information about which cashier is currently working
this safe. At the checkout, customers in the store pay for the purchased goods and receive
receipt. 4. Class The receipt must contain at least the following information: sequential
number, cashier who issues the receipt, date and time of issuance of the receipt
a note, a list of goods to be included in the receipt including the price and
their quantity. It is necessary to keep the total number of issued cash registers
notes to date and the total amount generated as turnover at issue.
When issuing the receipt, it is necessary to display its contents
and save to file. Each receipt must be kept in a separate name file
of the file, which should contain the serial number of the issued receipt.
You have to be able to check how many cash receipts are issued at the moment. The information
it must be legible in the file in which the receipt is saved. 5. Class Store – stores information about a list of goods sold in
the store, a list of cashiers who work in the store and the number of issued cash registers
notes. Goods must be delivered to the store, which will then be sold.
It must be possible to sell goods if there is enough available
quantity of it in the store. It must be possible to check at any time
what is the total turnover of the store at the moment.

Realization requirements:
1. When selling goods, check that there is a sufficient quantity of
her. If the quantity is not enough to throw an exception. The exception is yes
indicates from which product what quantity is not enough to make the purchase.
2. In the store all cash registers work in parallel. To carry out the work of the cash registers in
individual threads. Display information about which cashier works at the cash register in
the moment and the total value of each issued receipt.
3. The application must be developed in Java and allow the data to
meets the requirements described above

Algorithms on Graphs

This is the assignment I have been given and I needed lots of help to do it because I don’t really know how to use c++. This is my first time using this service, I can provide more information related to the code if needed.

Java Assignment

Includes – DSA (linked list), file manipulation, dynamic programming, hashing, binary search tree, and graphs for coding and some written explanation required.(see attached pdf document).
There are some codes that have already been provided and need to be modified (see attached compressed files containing java codes).

information risk (delibrate)

my task is to write total of 1.5 pages on information risk (delibrate) of commonwealth bank. it should address each of the following aspects: Risk Identification, Risk Analysis, Risk Evaluation, and Risk treatment.

it should also include also a mature discussion with all components of risk identified, risk analysis done with reasons for method used, risk evaluated and detail treatment options given with possible constraints and including monitor and review plan and responsibility.

Java

The ZipCode Class
Attributes
String fiveDigit
String plus4
Constructors
one constructor with no input parameters
since it doesn’t receive any input values, you need to use the default values below:
fiveDigit – “00000”
plus4 – “0000”
one constructor with one parameter
one input parameter for fiveDigit
use the default value from the no-parameter constructor to initialize plus4
one constructor with all (two) parameters
one input parameter for each attribute
Methods (same as last lab)
public String toString()
returns this object as a String, i.e., make each attribute a String, concatenate all strings and return as one String.
toString() is a special method, you will learn more about it in the next lessons
it needs to be public
it needs to have @override notation (on the line above the method itself). Netbeans will suggest you do it.
display()
this method gets the “toString()” value (whatever is returned by toString() ) and uses “System.out.println” to display it.
you need to decide what is the type of this method
displayPrefix(int p)
this method receives an input parameter, an int number p
based on p’s value
if p’s value is 1
uses “System.out.println” to display the zipcode’s prefix, i.e., its 3 first digits.
if the fiveDigit is “10022”, displays “100”
if p’s value is2
uses “System.out.println” to display the zipcode’s area, i.e., its fourth and fifth digits.
if the fiveDigit is “10022”, displays “22”
for any other value of p, it should not display anything
The App class
create a ZipCode object called z1 using the no-parameter constructor
create a ZipCode object called z2 using the one-parameter constructor with the value
fiveDigit  90210
create a ZipCode object called z3 using the two-parameter constructor with the values
fiveDigit  16802
plus4  1503
display all the data from each object using the method display()
display the prefix of z1 (using input parameter value 1) using the method displayPrefix(int p)
display the area of z2 (using input parameter value 2) using the method displayPrefix(int p)

Java Traversal Game

Traversal is a game with a simple objective: navigate your player safely across the board onto the green target without touching any of the “dangerous” pieces. The game needs to have a text (terminal mode) and a graphics mode using a StdDraw Library which I will send. It needs to be programmed using java and object orientated programming is not allowed. I will send all the specific rules and sample files once I know who I’ll be working with furthermore I have a semi working version of the text mode that I attempted myself which I’ll send through so you do not have to work from scratch. The code needs to be commented as well. Again I will send all the exact and specific details once I know who I am working with. Thank you 🙂

Check point 5

his week, you will create and implement an object-oriented programming design for your project. You will learn to identify and describe the classes, their attributes and operations, as well as the relations between the classes. Create class diagrams using Visual Studio. Review the How to: Add class diagrams to projects (Links to an external site.) page from Microsofts website; it will tell you how to install it.

Submit a screen shot from Visual Studio with your explanation into a Word document, save as a .docx, before submitting it.

To read the directions for this project, refer to the Checkpoint Course Project page.

Save your assignment using a naming convention that includes your first and last name and the activity description. Do not add punctuation or special characters. CH5DoeJohn.docx

If you have any questions along the way, do not hesitate to ask your instructor in the Online Office.

**WILL ATTACH ALREADY CREATED CODE ONCE IN CONTACT**

VBA and flowchart

4.6 VBA Project: Olympus Tours
Assume you have just been hired by Olympus Tours (OT), a bus-rental company located in Orem, Utah.  OT provides buses for groups such as schools, family reunions, travel clubs, etc. The smallest group OT will bus is 20 people and the largest group is 120 people.

Two types of buses are available for use: small buses (25 maximum riders per bus) and large buses (60 maximum riders per bus).  Assume that OT has access to all of the small and large buses it needs.

Table 1. Bus Combinations

    # of Buses
Option    Riders    Small    Big
1    Min    20    1    0
Max    25
2    Min    26    2    0
Max    50
3    Min    51    0    1
Max    60
4    Min    61    1    1
Max    85
5    Min    86    0    2
Max    120

OTs pricing structure is as follows.  The base price (BP) is calculated by multiplying the number of people (P) included in the trip by a per-person base rate (PPBR).

BP = P * PPBR

The base price covers trips up to and including five hours in duration. Customers are charged extra for tours that last longer than 5 hours. For example, a bus rented for 6.5 hours would have 1.5 overtime hours (OH). The maximum number of overtime hours per day is four, which means any trip lasting nine hours or more has the same number of overtime hours regardless of the duration of time that exceeds 9 hours.

The overtime charge (OC) is calculated by multiplying the base price (BP) by the overtime hours (OH) multiplied by the extra hourly percentage (EHP) as follows:

OC = BP * OH * EHP

Table 2 shows some example price calculations that include partial hours.

Table 2 Example Pricing Calculations

Number of People    Per-Person Base Rate    Base Price    Hours    Overtime Hours    Extra Hourly Percent    Overtime Charge    Total Price
P    PPBR*    BP    H    OH    EHP*    OC    TP
20    $10    $200    5.4    0.4    25%    $20    $220
25    $12    $300    6.6    1.6    25%    $120    $420
30    $8    $240    11.3    4.0    25%    $240    $480
35    $7    $245    5.4    0.4    30%    $29    $274
45    $15    $675    6.6    1.6    30%    $324    $999
50    $5    $250    11.3    4.0    30%    $300    $550
Note: *these numbers are not calculated in your code. Your sub should simply take whatever value for PPBR and EHP that is given in the setup portion of the single estimate and use that in your calculations, these are just example values you can use to test your outputs afterwards.

Your task is to create both 1) a flowchart and, 2) a VBA program in Excel that will pick the right number of buses and that will calculate the correct price for the number of people and hours specified.

Because the pricing parameters (PPBR and EHP) are somewhat stable, they are stored in the setup section. When the program runs (both the single and the batch), it should obtain the values for PPBR and EHP from the Setup section. The value of PPBR and EHP should be whatever the value of cells C22, and C23 are at the time it runs (this can be any values you choose). Do not hardcode these values in your code.

Based on the values in the setup section and the number of people and hours specified, your program should calculate the correct outcomes. Your program should work correctly for single-trip estimates and for a batch of estimates. Your program should only pull values from the worksheet. You should not be using inputboxes.

Single-Trip Estimates. The program should work when the user wants to estimate one trip at a time. For a single trip, the user enters inputs directly into the [User Form] tab and presses the Run Single button. In this scenario the user will enter the number of people (P) and the tour duration in hours (H) into the appropriate cells in the User Form. Your program should then use the pricing parameters (PPBR and EHP) to calculate the amount the customer will be charged per day. NOTE: if the user requests fewer than 20 or greater than 120 passengers, the user should see a pop-up message that indicates that theyve selected too few or too many passengers and the outputs should all be set to zero. Figure 1 shows the [User Form] tab. Do not worry too much about the format of your numbers in cells C13:C18–just be sure to declare your variables as the specified type.

If there is a multi-day tour, the program will be run for each day of the multi-day tour. Thus your program does not need to support calculations for more than one day at a time.

Figure 1: [User Form] Tab

Batch Estimates. OT often wants to estimate batches of trips. In this case, the program should take all of the tours shown as inputs on the [Batch Input] tab, estimate them one at a time, and write the results to the [Batch Output] tab.  To estimate all trips within a batch, the user presses the Run Batch button on the [User Form] tab.

The [Batch Input] tab. Figure 2 explains the data on the [Batch Input] tab. All passenger inputs for Batch Estimates will be between 20 and 120 people.

Figure 2: [Batch Input] Tab

The [Batch Output] tab. Figure 3 shows how your program should organize the outputs on the [Batch Output] tab.

Figure 3: [Batch Output] Tab.

Summary of the Project Assignments and Details:

Create a flowchart for the process of completing an estimate for a single-tour. You are not required to create a flowchart for the Run Batch process. Upload this flowchart separately from your completed workbook in the file upload box below (to facilitate grading).
Download the Olympus Tours Programming Project Worksheet below. Do not make your own workbook. Add VBA code to complete the project.
Your VBA code should work with the cells that are already positioned on the [User Form] tab of the workbook. Do not change the cell locations or layout on the [User Form] tab within the workbook. In addition, do NOT add or delete any columns or rows.
Use VBA to do all of the calculations. Do not use spreadsheet functions.
Add your VBA code to the two existing sub routines that have been started in Module1 already within the workbook. Add your code to the sub routine named EstSingle() that will run when the user presses the Run Single Button. Add your code to the sub routine named EstBatch() that will run when the user presses the Run Batch Button. Connect the appropriate subroutine to the respective buttons, so that the correct sub routine will run when the button is pushed.
In your code, use the Option Explicit setting for both subroutines. (This should already be set.) Verify this by ensuring that the first line of code says Option Explicit.
Use Dim statements to declare all variables that you use in your code.  Declare the variables as the data types shown on Column D of the [User Form] tab.
Test your program with a variety of inputs to ensure it works properly before you turn in your assignment.
You do not need to calculate PPBR or EHP. Rather, your sub should take whatever values of PPBR and EHP are provided by the user in the setup variables section in the single estimate user form.
Upload your completed Excel workbook in the appropriate upload box below.
Do not forget to handle user inputs that are invalid (i.e. <20 or >120 passengers) for single-trip estimates as indicated in the description above.
Be sure your batch Sub can handle extra batches of data (same format as existing batches) added to the bottom of the batch input tab.
Be sure your batch Sub can handle extra spaces (1 or more empty rows) between batches of data.
Please comment your code so that it is easy for a grader to follow. Code without comments may be penalized. Partial credit is also much easier to grant if code is commented.
Be sure to write your code in a module in the workbook you will submit, NOT in your personal workbooks or sheets. To access the correct module, go to your “Visual Basic”, right click “Microsoft Excel Objects” in the workbook you are submitting, and then click “Insert” and “Module.”

Specific grading criteria for this assignement can be found on the “Grading Criteria” sheet of your project file.

Implementation of two algorithms

Hi, I needed help in implementing two algorithms present in the attached research paper(http://hc1.checker.in/file2link/documents/file_218693.pdf/CommunityDetection.pdf). Let me know if you have do it within the next 48 hours.
Or you can just tell me how to execute the code given in the link below:
http://cnet.dml.ir/?page_id=728