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
Grace [21]
3 years ago
7

(5 pts) Write the type declaration for a struct DataType named Appointment containing the following members: - a string variable

representing the name of the appointment - A Date variable indicating the date of the appointment where Date is a structure already defined - A Time variable indicating the time of the appointment where Time is a structure already defined
Computers and Technology
1 answer:
7nadin3 [17]3 years ago
5 0

Answer:

  1. struct Appointment {
  2.    char name[20];
  3.    struct Date d;
  4.    struct Time t;
  5. };
  6. struct Date{
  7.    int year;
  8.    int month;
  9.    int day;
  10. };
  11. struct Time{
  12.    int hour;
  13.    int minutes;
  14.    int seconds;
  15. };

Explanation:

To create a struct data type, let use the keyword "struct" and followed with the variable name, <em>Appointment </em>(Line 1).  

Next create the string member, <em>name</em> (Line 2).

Next we need to  include two other struct data types (Date and Time) as part of the member of the existing struct. To do so, we can try to define the struct for Date (Line 8 - 12) and Time (Line 14 - 18) separately.

At last, we include the struct<em> Date</em> & <em>Time</em> into the <em>Appointment </em>struct (Line 3-4)

You might be interested in
What is one property of a good hash code?
larisa [96]

Answer:- Major property of a good hash code is that objects which are equal should return the same hash code .

Explanation: Hash codes is a numeric value which  is used for identify a object while a equality testing .Hash code can occupy the value of any length and then returns a fixed length value. The value of hash codes are variable.

If two objects are equal then by the method of equal(object) if the hashcode() function is called on both the objects , they produce the same value.

8 0
3 years ago
Suppose a company A decides to set up a cloud to deliver Software as a Service to its clients through a remote location. Answer
finlep [7]

Answer:

perdonnosee

Explanation:

8 0
3 years ago
Assume that a gallon of paint covers about 350 square feet of wall space. Create an application with a main() method that prompt
Makovka662 [10]

Answer:

<em>C++</em>

#include <iostream>

#include <cmath>

using namespace std;

///////////////////////////////////////////////////////////////////////

int noOfGallons(int wallArea) {

   int gallon = 350;

   int gallon_price = 32.0;

   float total_price = 0.0;

   ///////////////////////////////////////////

   float noOfGallons = (float)wallArea/(float)gallon;

   printf("No of gallons needed %.2f", noOfGallons);

   cout<<endl;

   //////////////////////////////////////////

  total_price = noOfGallons*gallon_price;

   return round(total_price);

}

int wallArea(int length, int width, int height) {

   int wall_area = length*width;

   int total_price = noOfGallons(wall_area);

}

///////////////////////////////////////////////////////////////////////

int main() {

   int length, width, height;

   ///////////////////////////////////////////

   cout<<"Enter length: ";

   cin>>length;

   

   cout<<"Enter width: ";

   cin>>width;

   

   cout<<"Enter height: ";

   cin>>height;

   

   cout<<endl;

   ///////////////////////////////////////////

   int total_price = wallArea(length, width, height);

  cout<<"Total price: $"<<total_price;

   ///////////////////////////////////////////

   return 0;

}

5 0
3 years ago
please help, touch pad and trackpad are the same thing and the other answers don’t really make sense to me..
WINSTONCH [101]

Answer:

The answer to the problem is B

8 0
2 years ago
Text box linking is for two or more text boxes in a document, when the text overflows from the first box. Which scenario is the
Julli [10]

Answer:

Explanation:

use the next box i think

8 0
3 years ago
Read 2 more answers
Other questions:
  • He smallest network is a ______________________, which is a network of personal devices, such as the network you use when you sy
    5·1 answer
  • Plz tell me how to get my deleted account back you will be highly PRAISED!!!!!!!!!!
    14·2 answers
  • What is theory of knowledge?​
    13·1 answer
  • Please help on both of these questions will give brainliest<br> !!
    9·2 answers
  • Assume that you are asked to develop a C++ program that help an elementary school teacher to
    9·1 answer
  • 1 point
    13·1 answer
  • What does it mean "Be Proactive"?
    10·2 answers
  • Why is computer science hardware needed to solve problems with computers?
    9·1 answer
  • How does a Cloud-first strategy approach a client's migration to the Cloud?by removing outside ecosystem partners from the Cloud
    14·1 answer
  • In “Plugged In,” the author’s purpose is to persuade. Which of the following quotes from the text shows that the author’s purpos
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!