1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
igomit [66]
2 years ago
5

Create a class named CollegeCourse that includes the following data fields: dept (String) - holds the department (for example, E

NG) id (int) - the course number (for example, 101) credits (double) - the credits (for example, 3) price (double) - the fee for the course (for example, $360).
Computers and Technology
1 answer:
frez [133]2 years ago
5 0

Answer:

The answer to this question can be given as:

code:

class CollegeCourse  

{

String Dept;

int CourseNumber;

double Credits;

double fee;

}

Explanation:

We all know that class is a collection of data members and member functions. In the above code we use the following syntax for class declaration that can be given as:

Syntax of class declaration :

class class_name

{

data member & member function

}

In the above code firstly we declare a class that is CollegeCourse. In this class, we define a variable that name and datatype is already given in the question that is String Dept, int CourseNumber, double Credits, double fee. In the variables first variable data type is string. It is used for store string value like ('us','xxx','aaa').The second variable datatype is an integer. It is used for store integer value like (1,23,5,56). The third and fourth variable datatype is the same that is double. This data type is used to store the floating-point value.

You might be interested in
Find the double word-length 2's complement representation of each of the following decimal numbers:a. 3874
miss Akunina [59]

Answer:

-3874₁₀ = 1111 1111 1111 1111 1111 1111 1101 1110₂

Explanation:

2's complement is a way for us to represent negative numbers in binary.

To get 2's complement:

1. Invert all the bits

2. Add 1 to the inverted bits

Summary: 2's complement = -N = ~N + 1

1. Inverting the number

3874₁₀ = 1111 0010 0010₂

~3874₁₀ = 0000 1101 1101₂

2. Add 1 to your inverted bits

~3874₁₀ + 1 = 0000 1101 1101₂ + 1

= 0000 1101 1110₂

You can pad the most signigicant bits with 1's if you're planning on using more bits.

so,

12 bits                          16 bits

0000 1101 1110₂  = 1111 0000 1101 1110₂

They asked for double word-length (a fancy term for 32-bits), so pad the left-most side with 1s' until you get a total of 32 bits.

           32 bits

= 1111 1111 1111 1111 1111 1111 1101 1110

7 0
3 years ago
Which one cost more Broken bones or a Broken Computer? Explian ur answer
vladimir1956 [14]
Broken bones cost more, because hospital bills are a lot more than to get a computer fixed.
4 0
3 years ago
Read 2 more answers
What was the first car ever produced by Henry ford
Slav-nsk [51]

It was "The Henry Ford"

6 0
3 years ago
What device connects a lan's switch to the next network? qizzlets?
laila [671]
I think you can call it to a Network Switch, but LAN is always used device network: Hubs and Switch or maybe Connect Device or Cable.
6 0
2 years ago
There are___standard colors for text in a theme.
Stella [2.4K]
There are two standard colors for a text in a them
6 0
3 years ago
Other questions:
  • Mobile devices typically come pre installed with standard apps like web browsers , media players, and mapping programs true or f
    9·1 answer
  • You have a network of 300 users. You are finding that you must frequently restore files from backup that users have accidentally
    13·1 answer
  • PASSAGE: The picnic had been scheduled for weeks in advance. The Morris family was looking forward to some fun and relaxation wi
    12·1 answer
  • Which of the following STEM discoverers is known for creating complex computational physics to develop computer models to simula
    7·1 answer
  • A database interrogation is a major benefit of the database management approach, where end users can query (“ask”) the database
    6·1 answer
  • ____ devices are high-performance storage systems that are connected individually to a network to provide storage for the comput
    5·1 answer
  • The concept of "space" on a computer usually refers to the___.​
    7·1 answer
  • Identify the independent and dependent variable in the statement: the number of hours studying for a class and the grade earned.
    12·1 answer
  • WILL GIVE BRAINLIEST!!!!!!!
    9·1 answer
  • Does anybody know how to get this little search bar thing off of my task bar on a HP laptop.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!