Pattern
Input
The first line input contains an Integer(N).
Explanation
Given N = 2 and T = 3
The first line having N spaces
and the last line having no spaces.
sample Input 1
2 2
sample Output 1
**
**
Sample Input 2
2 3
sample Output 2
**
**
**
Create a program that gets values as CMD args as follows, a person's name, year of birth and gender. The program then prints a message as follows:[HINT: if the person is male then the program uses Mr otherwise use Ms]
Sample 01:
Java Lab01_Task04 John 1999 M
Output
Good Mr John, you are 21 years old
Sample run 1:
Enter two numbers: 2 8
Output:
Even numbers: 2 4 6 8
Odd numbers: 3 5 7
Sum of even numbers = 20
Product of odd numbers = 105
Write a program that reads a string and returns a table of the letters of the alphabet in
alphabetical order which occur in the string together with the number of times each letter
occurs. Case should be ignored. A sample output of the program when the user enters the data
“ThiS is String with Upper and lower case Letters”, would look this this:
a 2
c 1
d 1
e 5
g 1
h 2
i 4
l 2
n 2
o 1
p 2
r 4
s 5
t 5
u 1
w 2
I want very simple code please
Karim runs 10 spaza shops in different suburbs, each named Skuld Huiswinkel. He asks all the storekeepers to record the final day total sales so that he can determine which of his shops has more sales for each day. He has approached you to write a program that will store the name of the location for each shop and the total sales for the day.
3.1 The program should capture the Skuld Huiswinkel name and the corresponding total sales value amount for the day, all in one cin line.
3.2 The program should store the spaza name and the total sales value in two parallel arrays.
(8 Marks)
3.3 The program should keep a running total that will give the total sales from all spaza shops and also show the average sales for the day.
3.4 Before the program closes, it should store all the values of the parallel arrays in a text file named SHW_Sales.txt. Each line in the file must have the shop location name and the sales value, with these 2 items separated by a space
Consider a schedule with 3 transactions with 2, 3, and 4 operations respectively. Calculate the possible
number of
c) Serial schedules
d) Non serial schedules
Consider the following schedule of transactions
R1(A) W1(A) R2(A) W2(B) W1(B) Commit1 Commit2
Which of the following properties are true for the above schedule and justify the reason for your answer
with explanation?
a) Conflict Serializable
b) View Serializable
c) Recoverable
Consider the following relation with set of functional dependencies
R(ABCDEF)
AB->CD, CD->EF, BC->DEF, D->B, CE->F
a) Identify the candidate keys in the above relation (with proper steps followed).
b) Identify which normal form this relation is in and reason for the answer.
HBL Bank requires account management software. The branch manager met with the software engineers and discussed the details/requirements. According to him, the bank needs to store account title (name), account number, account type and balance for each account entry. You can deposit and withdraw amount. You are required to provide a library that can be utilized in the management system. Analyze the problem, and implement (interface and definitions) using C++ classes. Comment the header file (the interface) so that a manager can understand the functionalities of every public member function. Class should contain a display function to print all information of an account on screen. Create a demo main program to check each and every function. Also create setter/getter and a parameterized constructor with default arguments.
Correct the code:-
public class DLL {
private Node start;
private Node end;
int count;
public DLL() {
start = end = null;
count=0;
}
public void insertAtstrat (Data d) {
if (count == 0) {
Node tn = new Node(d,null,null);
start = end = tn;
}
else {
Node tn = new Node (d,start,null);
start.prev = tn;
start (tn);
count++;
}
}
public void insertAtend (Data d) {
if (count == 0) {
insertAtend(d);
}
else {
Node tn = new Node(d,null,end);
end.next = tn;
end = tn;
count++;
}
public void insertAt(Data d, index i) {
if (count ==0 || index == 0);
insertAtstart(d);
else if (i >= count);
insertAtend(d);
else {
Node temp = start;
for (a = 1);
temp = temp.Node;
Node tn = new Node(d, temp.next, temp);
temp.next = tn;
temp = tn.next;
temp.prev = tn;
}
}
}
}
public class Node {
Data d;
Node next;
Node prev;
public Node (Data d,Node n,Node p) {
d = new Data();
next = n;
prev = p;
}