Computers and Technology, 31.12.2019 02:31 mashedpotatoes28
Given the following declaration for a class that represents a computer in a company's inventory, write a derived class declaration (for a class called installrecord) that adds (1) a string field representing the location of the computer and (2) a field of class simpledate that holds the installation date. the new class should provide observers for each of the new fields. it should also re implement the write function.
class computer
computer(string newname, string newbrand, string newmodel, int newspeed, string newserial, int newnumber);
string getname() const;
string getbrand() const;
string getmodel() const;
int getspeed() const;
string getserial() const;
int getnumber() const;
void write() const;
private
string name;
string brand;
string model;
int speed;
string serialnumber;
int inventorynumber;
use the computer and installrecord classes, together with the sortedlist class developed in chapter 13 (of book "programming and problem solving with c++"), as the basis for an object-oriented program that keeps track of a company's computer inventory. the company has at most 500 computers. the following operations should be supported:
add a new computer to the list.
delete a computer from the list.
change the location of a computer.
print a list of all computers in inventory-number order.
print a list of all computers in a given location.
print a list of all computer of a particular brand.
print a list of all computer installed before a given date.
the application should keep the list sorted by inventory number. it should read an initial list from a file called orginal. dat. at the end of processing, it should write the current data in the list onto a file called update. dat in a format that could be read back in by the program as an initial list. you will also need to develop the simpledate class to the degree necessary to support the application.
Answers: 3
Computers and Technology, 22.06.2019 10:40
Program using c++ only on visual studio pig is a simple two player dice game, played with one die. the first player to reach or surpass 50 is the winner. each player takes a turn rolling the dice. they add to the pot with each roll, having to decide to roll again and increase the pot, or cash out. the risk being they could lose the amount theyβve accumulated into the pot. the rules for each playerβs die roll. 1. roll the dice. a. if user rolled a 1, i. the pot gets set to zero ii. the other player goes to step 1. b. a roll of 2-6 is added to the pot. 2. user can choose to hold or roll again. a. choice roll. return to step 1. b. choice hold. i. increment player score by the pot amount. ii. pot gets set to 0. iii. second player gets to roll and goes to step 1. program requirements: β before each opponent begins β output the score for the person and the computer. β output the opponents whose turn is beginning and ask the user to hit enter to continue. β with each dice roll. β output the die value, and amount of the round pot. β if itβs the users roll ask if they want to roll again ( r ) or hold ( h ). your program should allow r, r, h or h as valid input. if input is anything else, ask the user again until valid input is obtained. β the ai will continue playing until the round pot is 20 or more. β once a playerβs score is greater or equal to 50 then they have won, it will no longer ask if they want to keep rolling the die or not. β once there is a winner β score totals are output along with who the winner was. user or computer β player is asked if they want to play again y or n. valid input should be y, y, or n, n. β when a new game starts the starting roll goes to the player that did not roll last. if the user rolled last in the previous game, then the computer rolls first and vice versa. when the program first begins, the player will make the first roll of the first game. development notes : β you will need a way to roll dice in your program. the rand() function works well, but returns an integer. if we want numbers 0 β 9 we can get the value modulus 10. β call srand() with a value to seed it. itβs common to seed it with the current computer clock, include ctime, and then call srand(time(
Answers: 1
Computers and Technology, 22.06.2019 19:20
Write a program that prompts the user to input a string. the program then uses the function substr to remove all the vowels from the string. for example, if str = "there", then after removing all the vowels, str = "thr". after removing all the vowels, output the string. your program must contain a function to remove all the vowels and a function to determine whether a character is a vowel.
Answers: 2
Computers and Technology, 22.06.2019 23:30
What is the digital revolution and how did it change society? what are the benefits of digital media?
Answers: 1
Computers and Technology, 23.06.2019 23:30
What can you prevent issues related to downloading content form the internet
Answers: 1
Given the following declaration for a class that represents a computer in a company's inventory, wri...
Biology, 13.10.2019 03:30
Biology, 13.10.2019 03:30
Arts, 13.10.2019 03:30
Mathematics, 13.10.2019 03:30
History, 13.10.2019 03:30
Biology, 13.10.2019 03:30
Mathematics, 13.10.2019 03:30
Biology, 13.10.2019 03:30
Social Studies, 13.10.2019 03:30
Mathematics, 13.10.2019 03:30
Mathematics, 13.10.2019 03:30
History, 13.10.2019 03:30