-
Notifications
You must be signed in to change notification settings - Fork 2
/
ImportentQuestionsForBYOD.txt
173 lines (101 loc) · 12.1 KB
/
ImportentQuestionsForBYOD.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
BYOD Practical1
1. Write an application for Schedule in which it stores different course names, meeting days and times in a two-dimensional array.
Ask the user to enter a course name (such as “CIS 110”), and display the day of the week and time that the course is held (such as “Th 3:30”).
If the course does not exist, display an error message.
2. Create an application for DayOfWeek that contains the data that represents the days of the week. Display a list of the days, and then prompt the user for a day.
Display business hours for the chosen day. For Example Assume that the business is open from 11 to 5 on Sunday, 9 to 9 on weekdays, and 10 to 6 on Saturday.
1. Write an application for Schedule in which it stores different course names, meeting days and times in a two-dimensional array.
Ask the user to enter a course name (such as “CIS 110”), and display the day of the week and time that the course is held (such as “Th 3:30”).
If the course does not exist, display an error message.
2. Create an application for DayOfWeek that contains the data that represents the days of the week. Display a list of the days, and then prompt the user for a day.
Display business hours for the chosen day. For Example Assume that the business is open from 11 to 5 on Sunday, 9 to 9 on weekdays, and 10 to 6 on Saturday.
1. Write an application for Schedule in which it stores different course names, meeting days and times in a two-dimensional array.
Ask the user to enter a course name (such as “CIS 110”), and display the day of the week and time that the course is held (such as “Th 3:30”).
If the course does not exist, display an error message.
2. Create an application for DayOfWeek that contains the data that represents the days of the week. Display a list of the days, and then prompt the user for a day.
Display business hours for the chosen day. For Example Assume that the business is open from 11 to 5 on Sunday, 9 to 9 on weekdays, and 10 to 6 on Saturday.
BYOD Practical 1
3. Create an application for Personal Phone Directory that contains room for first names and phone numbers for N(Value of N will be asked from user) people. Assign names and phone numbers for the first 10 people.
Prompt the user for a name, and if the name is found in the list, display the corresponding phone number.
If the name is not found in the list, prompt the user for a phone number, and add the new name and phone number to the list. Continue to prompt the user for names until the user enters “quit”.
After the arrays are full (containing N names), do not allow the user to add new entries.
4. Write an application of Input Grades that prompts a professor to enter grades for five different courses each for N students(Value of N will be asked from user).
Prompt the professor to enter data for one student at a time, including student ID and course data for five courses. Use prompts containing
the number of the student whose data is being entered and the course number—for example, “Enter ID for student #s”, where s is an integer from 1 through N, indicating the student, and “Enter course ID #n”, where n is an integer from 1 through 5, indicating the course number.
Verify that the professor enters only A, B, C, D, or F for the grade value for each course.
3. Create an application for Personal Phone Directory that contains room for first names and phone numbers for N(Value of N will be asked from user) people. Assign names and phone numbers for the first 10 people.
Prompt the user for a name, and if the name is found in the list, display the corresponding phone number.
If the name is not found in the list, prompt the user for a phone number, and add the new name and phone number to the list. Continue to prompt the user for names until the user enters “quit”.
After the arrays are full (containing N names), do not allow the user to add new entries.
4. Write an application of Input Grades that prompts a professor to enter grades for five different courses each for N students(Value of N will be asked from user).
Prompt the professor to enter data for one student at a time, including student ID and course data for five courses. Use prompts containing
the number of the student whose data is being entered and the course number—for example, “Enter ID for student #s”, where s is an integer from 1 through N, indicating the student, and “Enter course ID #n”, where n is an integer from 1 through 5, indicating the course number.
Verify that the professor enters only A, B, C, D, or F for the grade value for each course.
3. Create an application for Personal Phone Directory that contains room for first names and phone numbers for N(Value of N will be asked from user) people. Assign names and phone numbers for the first 10 people.
Prompt the user for a name, and if the name is found in the list, display the corresponding phone number.
If the name is not found in the list, prompt the user for a phone number, and add the new name and phone number to the list. Continue to prompt the user for names until the user enters “quit”.
After the arrays are full (containing N names), do not allow the user to add new entries.
4. Write an application of Input Grades that prompts a professor to enter grades for five different courses each for N students(Value of N will be asked from user).
Prompt the professor to enter data for one student at a time, including student ID and course data for five courses. Use prompts containing
the number of the student whose data is being entered and the course number—for example, “Enter ID for student #s”, where s is an integer from 1 through N, indicating the student, and “Enter course ID #n”, where n is an integer from 1 through 5, indicating the course number.
Verify that the professor enters only A, B, C, D, or F for the grade value for each course.
BYOD Practical 1
5. Write an application of Retirement Goal that prompts a user for the number of years the user has until retirement and the amount of money the user can save annually.
If the user enters 0 or a negative number for either value, reprompt the user until valid entries are made. Display the amount of money the user will have if the user earns 5% interest on the balance every year.
6. Write an application on Population. Assume that the population of Mexico is 114 million and that the population increases 1.01 percent annually. Assume that the population of the United States is 312 million and that the population is reduced 0.15 percent annually.
Display the populations for the two countries every year until the population of Mexico exceeds that of the United States, and display the number of years it took.
5. Write an application of Retirement Goal that prompts a user for the number of years the user has until retirement and the amount of money the user can save annually.
If the user enters 0 or a negative number for either value, reprompt the user until valid entries are made. Display the amount of money the user will have if the user earns 5% interest on the balance every year.
6. Write an application on Population. Assume that the population of Mexico is 114 million and that the population increases 1.01 percent annually. Assume that the population of the United States is 312 million and that the population is reduced 0.15 percent annually.
Display the populations for the two countries every year until the population of Mexico exceeds that of the United States, and display the number of years it took.
5. Write an application of Retirement Goal that prompts a user for the number of years the user has until retirement and the amount of money the user can save annually.
If the user enters 0 or a negative number for either value, reprompt the user until valid entries are made. Display the amount of money the user will have if the user earns 5% interest on the balance every year.
6. Write an application on Population. Assume that the population of Mexico is 114 million and that the population increases 1.01 percent annually. Assume that the population of the United States is 312 million and that the population is reduced 0.15 percent annually.
Display the populations for the two countries every year until the population of Mexico exceeds that of the United States, and display the number of years it took.
5. Write an application of Retirement Goal that prompts a user for the number of years the user has until retirement and the amount of money the user can save annually.
If the user enters 0 or a negative number for either value, reprompt the user until valid entries are made. Display the amount of money the user will have if the user earns 5% interest on the balance every year.
6. Write an application on Population. Assume that the population of Mexico is 114 million and that the population increases 1.01 percent annually. Assume that the population of the United States is 312 million and that the population is reduced 0.15 percent annually.
Display the populations for the two countries every year until the population of Mexico exceeds that of the United States, and display the number of years it took.
BYOD Practical1
7. Write an application that displays every perfect number from 1 through 1,000. A perfect number is one that equals the sum of all the numbers that divide evenly into it.
For example, 6 is perfect because 1, 2, and 3 divide evenly into it, and their sum is 6;however, 12 is not a perfect number because 1, 2, 3, 4, and 6 divide evenly into it, and their sum is greater than 12.
8. Write an application that take a number from the user and find the position of only the even digits from that number, And then calculate sum of all such positions, and display it.
Eg. 9 8 4 3 2 5 is the number,
1 2 3 4 5 6 are the positions respectively,
(Take the positions from west to east and starting from 1). Position of even digits is 2,3,5, sum= 10.
The input is the number and the output is the sum.
Test case 0: i/p 9823 o/p 5
Test case 1: i/p 232 o/p 4
Test case 2: i/p 88134 o/p 8
Test case 3: i/p 234236 o/p 14
Test case 4: i/p 329468 o/p 17
Test case 5: i/p 989698969 o/p 20
Test case 6: i/p 8811445566 o/p 33
7. Write an application that displays every perfect number from 1 through 1,000. A perfect number is one that equals the sum of all the numbers that divide evenly into it.
For example, 6 is perfect because 1, 2, and 3 divide evenly into it, and their sum is 6;however, 12 is not a perfect number because 1, 2, 3, 4, and 6 divide evenly into it, and their sum is greater than 12.
8. Write an application that take a number from the user and find the position of only the even digits from that number, And then calculate sum of all such positions, and display it.
Eg. 9 8 4 3 2 5 is the number,
1 2 3 4 5 6 are the positions respectively,
(Take the positions from west to east and starting from 1). Position of even digits is 2,3,5, sum= 10.
The input is the number and the output is the sum.
Test case 0: i/p 9823 o/p 5
Test case 1: i/p 232 o/p 4
Test case 2: i/p 88134 o/p 8
Test case 3: i/p 234236 o/p 14
Test case 4: i/p 329468 o/p 17
Test case 5: i/p 989698969 o/p 20
Test case 6: i/p 8811445566 o/p 33
7. Write an application that displays every perfect number from 1 through 1,000. A perfect number is one that equals the sum of all the numbers that divide evenly into it.
For example, 6 is perfect because 1, 2, and 3 divide evenly into it, and their sum is 6;however, 12 is not a perfect number because 1, 2, 3, 4, and 6 divide evenly into it, and their sum is greater than 12.
8. Write an application that take a number from the user and find the position of only the even digits from that number, And then calculate sum of all such positions, and display it.
Eg. 9 8 4 3 2 5 is the number,
1 2 3 4 5 6 are the positions respectively,
(Take the positions from west to east and starting from 1). Position of even digits is 2,3,5, sum= 10.
The input is the number and the output is the sum.
Test case 0: i/p 9823 o/p 5
Test case 1: i/p 232 o/p 4
Test case 2: i/p 88134 o/p 8
Test case 3: i/p 234236 o/p 14
Test case 4: i/p 329468 o/p 17
Test case 5: i/p 989698969 o/p 20
Test case 6: i/p 8811445566 o/p 33