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

Create a class named 'Student' with a string variable 'name' and an integer variable 'roll_no'. Assign the value of roll_no as '20021' and that of name as "Sidra" by creating an object of the class Student.

Write a C++ program that stores the grades of N students in an array of size 100. The


user must input at the beginning of the program the number of students N., then the


user must input the grade for each student. The program then must display the


following menu (use functions):


1. Print the minimum and maximum grade. (10 points)


2. Print the number of passing and failing students. (10 points)


3. Print the average grade, the percentage of passing students (grade >=70), and


the percentage of students that got a grade greater or equal to the average


grade. (15 points)


4. Exit. (5 points)

Consider following class Certification with following data members Id (int), name (String) ,hours(int),level (String),costPerHr (double). Provide a class StudentCertification that extends Certification. This class has an additional data member rebate (double). Override the calculateFee method so that the total cost is calculated by getting the total for the training hours @costPerHr and applying the rebate (%). E.g. if the costPerHr is 200 and 50 hours training and 0.2 rebate then the calculateFee should return 10000 – 0.2 *10000 = 8000. Provide another sub class ProfessionalCertification that extends Certification. This class no additional data member. It overrides calculateFee method so that total cost is returned as product of hours and cost per hour plus 15% tax of total hours cost. Also ProfessionalCertification implements Extendible Interface. You will also have to provide the implementation of method extend(int duration). For this you need to add the duration to training hours of the certification  


Write a method called sumFirstAndLastDigist() with one parameter of type int called number.


.


The methods needs to find the first and Last digist of the parameter number passed to the method, using a loop and return the sum of the first and Last digis


.


Here's an example:


Let's say you call sumFirstAndLastDigit(23456);


This should return 8 because 2 + 6 = 8

While taking a viva class teacher decides to take the viva of two roll numbers at a time.

For this she calls the roll numbers from roll numbers list as : one roll number from 1st nth roll number and 2nd roll number from the nth last roll number. For example if the numbers are : roll-num=[21,23,45,6,7,23,9,11,15,18] and n=3. One roll number calls 45 for viva and

second roll number called 11 for viva. Write a python function CRN(X, n) which take a list X and nth roll no. as input and returns 1st nth roll no. and 2nd roll no. from nth last roll no.

If nth roll number does not lie in range of the list the function will return "n not in range" in place of 1st roll no. and empty string " " in place of 2nd roll number. Give fixed input .


You are required to build an application for charity organization. Your application will keep track of the items given out as charity. The items are donated by people and your application will keep track of each donation in persistence store. CharityItem: description (String), quantity (int), estimatedAmount (double), donor name (String), Donor contact (String) You are also required to do some exception programming/handling. If a charity with a value greater than 2 lacs is donated, then you will raise the ShowOffCharityException. You will have to create an exception class for this and the exception will be raised from the constructor of the CharityItem class under the said condition. You will also write code at other places wherever required to deal with this exception. Please note that you will make your ShowOffCharityException as a checked exception. 


The first line will contain a message prompt to input the integer.

The second line contains "Positive" if the integer is positive, or "Negative" if it isn't.

Enter·n:·-12
Negative

Provide another sub class ProfessionalCertification that extends Certification. This class no additional data member. o It overrides the calculateFee method so that the total cost is returned as the product of hours and cost per hour plus 15% tax of the total hours cost. o Also the ProfessionalCertification implements the Extendible Interface. You will also have to provide the implementation of method extend(int duration). For this you need to add the duration to the training hours of the certification  The correctness of your code will be checked against a main program that will be provided along with the expected output


Q. No. 02 Consider the following class Certification with following data members Id (int), name (String) , hours(int), level (String), costPerHr (double) Implementation of this class is provided on moellim. You are required to do the following  Provide a class StudentCertification that extends Certification . This class has an additional data member rebate (double) o Override the calculateFee method so that the total cost is calculated by getting the total for the training hours @costPerHr and applying the rebate (%). E.g. if the costPerHr is 200 and 50 hours training and 0.2 rebate then the calculateFee should return 10000 – 0.2 *10000 = 8000 


1. Write a list of book defining parameters. (5 at least)



o Name (String) – Topic (String) – Pages (int) – IsEnglishLanguage (bool) – Price



(float)



2. Declare and initialize the variables of book parameters.



3. Take input from user and output all the parameters given by user.



4. Create a function to initialize book parameter taken form user.



5. Initialize and store 2 books’ parameters. Print the book with more pages, total number of



pages.



6. Print the page numbers of each book using loop. (1 – 2 – 3 – 4 …..)



7. Store the 3 books data using array (each parameter separate).



8. Use loop store 10 books data in array, given by user. Print the data after input using



function and loop.



9. Store one book data via pointer



10. Store one book data via Reference



11. Store one book data via pointer. Use function to initialize the data given by user.



12. Store one book data via Reference. Use function to initialize the data given by user.

LATEST TUTORIALS
APPROVED BY CLIENTS