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

Bookong List Programming--developer needs to input the following information from the console using programming to view the booked ticket history for a passenger.

*passenger id: a 7 digit number for passenger id for whom booking is to be done.

*on submitting the passenger id,the console shows rows with columns populated from inserted array/list/appropriate collections; PNR NO|Travel date| source|destination|Seat preference|Meal preference


ticket booking programming;--Developer needs to input the following from the console using programming to book ticket for a passenger:

-passenger id:a 7 digit number for passenger id for whom booking is to be done.

-pnr no:a string field for pnr no with a default 7 digit number.

-travel date:a string field to enter the journey date in format(dd/mm/yyyy).

-source:a string field to capture the source airport.

-destination:a string field to capture the destination airport.

-status:a string field to select among following values new/confirm/hold.

-seat preference:a string field to select among following values,middle,aisle.

-meal preference:a string field to select among following values.

**once all fields are taken input,booking details need to be inserted in array/list/appropriate collection.after successful booking,a booking acknowledgment message need to be displayed on the console as "ticket booked successfully,Happy Journey...".


developer needs to input the following information from the console using programming to register passenger:passenger id:a random 7 digit number for passenger id with a default value;....passenger name:a string field for passenger name(maximum 50 characters);....email:a string field to capture the email;....password:a string field for password(maximum 30 characters);....Address:a string field to capture street,city details(maximum 100 characters);...Contact number:text field(maximum 10 characters);....once all fields are taken as input,passenger details need to be inserted in array/list/appropiate collection.after successful registration,a registration acknowledgment message need to be displayed on the console as "passenger registration is successfull".


Consider the relations Authors(auID,name) and Authoring(articleID,authorID), containing


information on names of authors, and who is authoring which papers, respectively.


i) Write an SQL query that returns for each article, its ID, title and the number of authors.


ii) Write an SQL query that returns the titles of articles authored by 'Robert Tarjan'.


iii) Write an SQL query that returns the number of co-authors of 'Robert Tarjan'. (I.e., the number of


authors who have written at least one article together with him

Write an SQL query that returns for each article, its ID, title and the number of authors.

1)     Write a program that accepts a set of integers (the user decides how many) and then stores them in an array. The main function then passes these values one by one to a method called get_even which returns 1 if the integer is even and 0 if it is odd. The main function should then specify which numbers were even, which ones were odd and their respective totals. It should also specify how many numbers were odd and how many were even. For example, if the user enters 25 34 56 17 14 20, the output should be: -

25 is an odd number

34 is an even number

56 is an even number

17 is an odd number

14 is an even number

20 is an even number 


There is a total of 2 odd numbers and their sum is 42.

There is a total of 4 even numbers and their sum is 124.

NB: All data input and output should be done in main. Don’t use % any where in the main function (% can be used in the method).                                 


The XYZ Telephone Company’s charges file, contains records for each call made by its subscribers during a month. Each record on a file contains the subscriber’s name and phone number, the phone number called, the distance from Shah Alam of the number called (in kilometres) and duration of the call in seconds.

Design an algorithm that will read the Tidy Phones charges file and produce a telephone charges report, as follows:

 

The cost of each call is calculated based on table 1.

Distance from Metroville

Cost($)/minute

Less than 25 km

0.35

25 <= km < 75

0.65

75 <= km < 300

1.00

300 <= km <=1000

2.00

Greater than 1000 km

3.00

 

Write C++ complete programs for the above problem. You program must use control structure and user defined function.

 


seconds.

 

As a junior programmer, you are required to design and write a complete C++ program that asked the user to enter subscriber’s name and phone number, the phone number called, the distance from Shah Alam of the number called (in kilometers) and duration of the call-in seconds. The user also needs to enter types of call either Local or International call.

 

The cost of each call is calculated based on Table 1.

 

Distance from Shah Alam

Cost(RM)/minute

 

Local

International

Less than 25 km

0.35

0.55

25 <= km < 75

0.65

0.85

75 <= km < 300

1.00

1.20

300 <= km <=1000

2.00

2.20

Greater than 1000 km

3.00

3.20

 

Your program should use the following:

 

1. Appropriate Control Structure

2. User Defined Function

3. Sets the decimal precision to be used to format floating-point values on output operations. (2 decimal places)

4. Set background and text colour for output


Using the Sieve Algorithm remove all non-prime numbers on the given below. (Show your complete solution.)



1. 2 3 4 5 12 13 15 24 25 29 38 39 43 57 58 61



2. 2 3 4 5 103 104 105 106 107 108 109 110 111 112 113 114 115

Using the consecutive Integer Checking Algorithm, solve the GCD of the following pair of numbers. (Show your complete solution.)



1. GCD (19, 7)

LATEST TUTORIALS
APPROVED BY CLIENTS