Questions: 11 448

Answers by our Experts: 10 707

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 & Filtering

Write a program which will do the following:

Create a class called

Triangle

. The three sides of the triangle

are private

members of the class. The

class should contain a member f

unction to determine whether a

triangle is equilateral, isosceles or

scalene.

The class

should

also

include member functions which will give area and perimeter of the

triangle. The side

s of the triangle should be taken as input from the user in the main function.



A. With the use of a suitable diagram explain how a person can get an electrical shock from touching an unearthed isolator. State ONE (1) precaution that can be taken to prevent a reoccurrence

Administrative Controls. o Adding / Removing Trains o Approving or Confirming Tickets o Cancelling Trains and Tickets o Reporting Delays. o Selling Tickets o Storing Passengers Information o Safely accessing the system using passwords encrypted. 


Ticket Reservation • Trains Information Regarding Delays. • Virtual Payment Module • Ticket Vending Machines • Ticket Cancellation Module with a custom defined Refund Policy • Trains Information with multiple trains for same routes. • Administrative Controls. o Adding / Removing Trains o Approving or Confirming Tickets o Cancelling Trains and Tickets o Reporting Delays. o Selling Tickets o Storing Passengers Information o Safely accessing the system using passwords encrypted.


Implement this program by using User-defined functions and Structures


Write a program that reads students’ names followed by their test scores. The program should output each student’s name followed by the test scores and the relevant grade. It should also find and print the highest test score and the name of the students having the highest test score. Student data should be stored in a struct variable of type studentType, which has four components: studentFName and studentLName of type string, testScore of type int (testScore is between 0 and 100), and grade of type char. Suppose that the class has 20 students. Use an array of 20 components of type studentType.


Your program must contain at least the following functions:

1. A function to read the students’ data into the array.

2. A function to assign the relevant grade to each student.

3. A function to find the highest test score.

4. A function to print the names of the students having the highest test score.


Write a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less than 100


Type a statement using srand() to seed random number generation using variable seedVal. Then type two statements using rand() to print two random integers between (and including) 0 and 9


Listing 102

by CodeChum Admin

We've already made listing an array the easy way, but how about listing and printing the array in reverse order?


Make a program that will input an integer and then using loops, add items on an array/list one by one for the same number of times as that of the first inputted integer. Then, print out the array/list in ascending order. After doing that, print the array again on the next line in reverse order, that is, starting from the last item on the array/list down to the first one, each in separated lines.


Input

The first line contains the size of the array.

The next lines contains the items of the array (integers).

5
1
64
32
2
11

Output

The first line contains the elements of the array printed in ascending order.

The second line contains the elements of the array printed in reversed order.

1·64·32·2·11
11·2·32·64·1

Only the Even Ones

by CodeChum Admin

I have an array of 3 numbers here with me that's already in the code editor, but I want you to add some more to this list by inputting some more numbers yourself in one line and then, print out only the even numbers from the array.


Can you do that for me?


Input

The first line contains the number of elements, n, to be added.

The next line contains the n integers separated by a space.

5
33·54·32·11·8

Output

Multiple lines containing an integer.

2
54
32
8

A class named Processor has



•Two attributes i.e. processName and price



•A parameterized constructor to initialize attributes with user-defined values



Class MainMemory consists of



•Two attributes i.e. size and price



•A parameterized constructor to initialize attributes with user-defined values



Class MotherBoard has



•a data member named compName of type string



•a no-argument constructor to initialize with default name intel



Design a class named Computer that includes



•A data member named proc of type Processor



•A data member named ram of type MainMemory



•A data member named mboard of type MotherBoard



•A parameterized constructor that accept two arguments of type Processor and MainMemory to initialize members of these types. Moreover, within this constructor, instantiate object of MotherBoard to initialize mboard data field.



Write a main() and create necessary objects of the classes and call the corresponding functions.





LATEST TUTORIALS
APPROVED BY CLIENTS