Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

Write a python code to read a dataset (may be CSV file) and print all features i.e. columns of the dataset. Determine the descriptive statistics i.e. Maximum, Minimum Mean Median, Count, Variance, Standard Deviation etc. of the numeric features like age, salary etc., may be present in the dataset.


Write Program to perform following tasks (10 Marks)

a. Create a database SELECTION_DB

b. Set connection with mysql.connector.connect.

c. Create a table EMP_SELECTION in database SELECTION_DB with following data FIRST_NAME,LAST_NAME,AGE,GENDER,INCOME.

d. change table structure / (add, edit, remove column of a table) at run time

i. add a column address in the EMP_SELECTIONtable.

ii. execute SQL INSERT statement to create a record into EMP_SELECTION table

iii. run the query to updates all the records having GENDER as 'M', and increase AGE of all the males by one year.

iv. delete all the records from EMP_SELECTION Table where AGE is less than 18 .


Numbers in String - 2

Given a string, write a program to return the sum and average of the numbers that appear in the string, ignoring all other characters.


Input


The input will be a single line containing a string.


Output


The output should contain the sum and average of the numbers that appear in the string.

Note: Round the average value to two decimal places.


Explanation


For example, if the given string is "I am 25 years and 10 months old", the numbers are 25, 10. Your code should print the sum of the numbers(35) and the average of the numbers(17.5) in the new line.


Sample Input 1

I am 25 years and 10 months old


Sample Output 1

35

17.5


Sample Input 2

Tech Foundation 35567


Sample Output 2

35567

35567.0




Create a class called with your Reg No, as Invoice18Arid876, that a hardware store might use to represent an invoice for an item sold at the store. An Invoice should include four pieces of information as instance variables a part number (type String), a part description (type String),a quantity of the item being purchased (type int) and a price per item (double).

 

Your class should have a constructor that initializes the four instance variables. Provide a set and a get method for each instance variable. In addition, provide a method named getInvoice Amount that calculates the invoice amount (i.e., multiplies the quantity by the price per item), then returns the amount as a double value. If the quantity is not positive, it should be set to 0. If the price per item is not positive, it should be set to 0.0. Write a test application named InvoiceTestYourName that demonstrates class Invoice’s capabilities.



You've to develop table tennis fantasy league.Here're details of league:no. of team (4) and no. of player/team (3). Each team will have to play

other team twice,so you can calculate total number of matches.

1.addPlayers():add player data.

Sr. No. Name Type Point Availability

1 Name Player 1 Attacking 35.93 true

3.assignRanks(): Assign ranking to 4 teams on the basis of random number.

4.teamSelection(): Form team on basis of strategy,defensive team will prefer two defensive

players and one attacking player.Whereas an attacking team will prefer two attacking players and

one defensive player.

6.generateMatchStats():This function will generate match status.Assign winning team players’ point

b/w 10 & 20 randomly. For losing team assign them point between 5 & 10 randomly.

7.bestPlayersInMatch():Display information of best player of both teams

8.UpdatePlayerPoints():After match update ranking point of players

9.printLeaderBoard():Print sorted list of player in all teams


Plane landing is an optimization problem and need sophisticated

algorithms to assign landing time and runway to each plane. You have to develop a very simplistic

solution to the plane landing problem. Here is the assumption for the problem that you are going to

solve:

Input to the program is a schedule of flights who are going to land in 10 minutes. For each flight you will

have to enter some following information: flight number, remaining fly time (this time is updated when it

contacts the AirController), scheduled landing time (this time of all the flights have to be within this 10

minute window). Sample data might look like this:

Arrival Time From Flight No.

Airport for which we are designing this solution has only three runways. Each runway can be used for

landing. Once a plane is allocated to a runway it will be occupied for at least 2 minutes.


You've to develop software for bookshop.Program should be able to calculate total sales,salaries of salesman,types of book sold,record each

customer data.You've to enter data of three salesperson and at least 10 books (try to enter data of

three different types).Consider following structures, you

can always add additional data member if you feel it will result in better/efficient design:


You have to write following functions:

1. totalSales(): Total sales done

2. totalSalesBySalesPerson(): Total sales done by a specific sales person

3. topSalesPerson(): List of sorted sales person along with the total sales done by them

4. commissionSalesPerson(): Calculate commission of a sales person

5. totalSalary(): Calculate the amount that the owner has to pay to all sales person

6. booksInventory(): remaining books in inventory

7. booksInventoryByType(): remaining books by type


Consider a computer with the following characteristics: total of 256Mbyte of main memory; block size of 8 bytes; and cache size of 128 Kbytes.

 

i. Design a direct-mapping address structure.

ii. Design an associative-mapping address structure.

iii. Design a two-way set-associative-mapping address structure.

iv. For the main memory addresses of F0010ABH, F012356H, and 00CABBEH, give the corresponding tag, cache line address, and word offsets for a direct-mapped cache.

v. For the main memory addresses of F0010ABH, F012356H, and 00CABBEH, give the corresponding tag and offset values for a fully-associative cache.

vi. For the main memory addresses of F0010ABH, F012356H, and 00CABBEH, give the corresponding tag, cache set, and word offset values for a two-way set-associative cache.



Suppose a computer having 5 GHz processor with cycle time of 4ns and main memory access time

200ns with CPI is 1 cycle.

i. Calculate the processor performance without cache.

ii. Calculate the performance with L1 cache, assume L1 hit rate is 85% and access time is 0.4ns.

iii. Calculate the performance with L2 cache, assume L2 hit rate is 80% and access time is 10ns.

iv. Calculate the performance with L3 cache, assume L3 hit rate is 75% and access time is 10ns.



Write a program which has a class named binary which has a character array to store a binary string. The class decimal derives from class binary and contains an integer data member. Another class called octal also derives from binary. Each class should contain constructors and appropriate data members to input and display the elements. The display function of binary class displays the binary equivalent, octal class’s display function displays octal equivalent whereas decimal class’s display function displays the decimal equivalent




please dont use bitset stream ,use user define method for conversion


LATEST TUTORIALS
APPROVED BY CLIENTS