State the sylvester's law of inertia.
Implement the following sequence of operations one by one
1. Make a linked list for 26 (a to z) english alphabets where each node consists a single alphabet, an integer data for frequency count (initially 0) and next pointer. This list should be sorted in ascending order according to the ASCII value of the alphabets.
2. Now you have given a string consists of english alphabets. Your task is to update the frequency count values of above list for each occurrence of alphabets inside the given string.
For example, if the string is “babaaedd” then the updated list should be like this:
3. Finally traverse the whole list and print each alphbets with their frequency one by one from a to z. Please follow the sample input-output format. Input string length is not more than 100.
Sample input
Mistcsedepartment
Sample output
a : 1
b : 0
c : 1
d : 1
e : 3
f : 0
g : 0
h : 0
i : 1
j : 0
k : 0
l : 0
m : 2
n : 1
o : 0
p : 1
q : 0
r : 1
s : 2
t : 3
u : 0
v : 0
w : 0
x : 0
y : 0
z : 0
As a programmer you must be able to follow precise instructions. You will also not always get precise instructions. You must learn to ask questions and make valid deductions of what is expected. Code the StudentAccount class according to the class diagram Methods explanation: pay(double): double This method is called when a student pays an amount towards outstanding fees. The balance is reduced by the amount received. The updated balance is returned by the method. addFees(double): double This method is called to increase the balance by the amount received as a parameter.
Write three topics for three projects that you would wish to undertake in your course concerning a research proposal in software Engineering
Write a javascript program that asks the user to enter his or her first name and then last name, and then constructs, stores, and displays a third string consisting of the user’s last name followed by a comma, a space, and first name. Use string objects and methods from the string header file. A sample run could look like this: Enter your first name: Paul Enter your last name: Smith Here’s the information in a single string: Smith, Paul
Write a javascript program that asks the user to enter up to 10 golf scores, which are to be stored in an array. You should provide a means for the user to terminate input prior to entering 10 scores. The program should display all the scores on one line and report the average score. Handle input, display, and the average calculation with three separate array processing functions.
Have is a binary image consist of "0‟ and ".‟ where "0‟ means a black pixel and „.‟ means a white pixel. Store this image using one singly list per row . Finally show its mirror image.
Each node may contain an integer counter for counting number of following "0‟s or ".‟s.
Simply insert a node after dummy node of a row
Input:
20 32
00000000000000000000000000000000
00000.....0000.....0000......000
0000.00000000.00000.000.00000000
000.000000000.000000000.00000000
000.0000000000.....0000....00000
000.000000000000000.000.00000000
0000.00000000.00000.000.00000000
00000.....0000.....0000......000
00000000000000000000000000000000
00000000000000000000000000000000
0000000000000.000000.00000000000
000000000000..00000..00000000000
00000000000...0000...00000000000
0000000000000.000000.00000000000
0000000000000.000000.00000000000
0000000000000.000000.00000000000
0000000000000.000000.00000000000
000000000000...0000...0000000000
00000000000.....00.....000000000
00000000000000000000000000000000
Store two polynomial using single linked lists. Perform addition operation on them and store the output in another single linked list. Define your own class and required functions.
See the following sample input and output.
Sample:
Input:
5x3+2x2+3x+4
4x2+3
Output:
5x3+6x2+3x+7
Create a class motorcycle that contains the following attributes: The name of motorcycle, the direction of motorcycle (E, W, N, S) and the position of motorcycle (from imaginary zero point) The class has following member functions: A constructor to initialize the attributes, Turn function to change direction of the motorcycle to one step right side. Overload the turn function to change the direction to any side directly. It should accept the direction as parameter. More function to change the position of motorcycle away from zero point. It should accept the distance as parameter